Apache CXF API

org.apache.cxf.io
Class AbstractWrappedOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.apache.cxf.io.AbstractWrappedOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public abstract class AbstractWrappedOutputStream
extends java.io.OutputStream

Provides a convenient hook onFirstWrite() for those needing to wrap an output stream.


Field Summary
protected  java.io.OutputStream wrappedStream
           
protected  boolean written
           
 
Constructor Summary
protected AbstractWrappedOutputStream()
           
 
Method Summary
protected  void onFirstWrite()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
close, flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wrappedStream

protected java.io.OutputStream wrappedStream

written

protected boolean written
Constructor Detail

AbstractWrappedOutputStream

protected AbstractWrappedOutputStream()
Method Detail

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

onFirstWrite

protected void onFirstWrite()
                     throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(int b)
           throws java.io.IOException
Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

Apache CXF API

Apache CXF is an effort undergoing incubation at the Apache Software Foundation(ASF) and sponsored by the Apache Incubator PMC.