Apache CXF API

org.apache.cxf.io
Class CacheAndWriteOutputStream

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

public class CacheAndWriteOutputStream
extends CachedOutputStream

This outputstream implementation will both write to the outputstream that is specified and cache the data at the same time. This allows us to go back and retransmit the data at a later time if necessary.


Field Summary
 
Fields inherited from class org.apache.cxf.io.CachedOutputStream
currentStream, outputLocked
 
Constructor Summary
CacheAndWriteOutputStream(OutputStream stream)
           
 
Method Summary
 void closeFlowthroughStream()
           
 OutputStream getFlowThroughStream()
           
protected  void onWrite()
           
protected  void postClose()
          Perform any actions required after stream closure (close the other related stream etc.)
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class org.apache.cxf.io.CachedOutputStream
close, copyStream, deregisterCallback, doClose, doFlush, equals, flush, getBytes, getCallbacks, getInputStream, getOut, getTempFile, hashCode, holdTempFile, lockOutputStream, registerCallback, releaseTempFileHold, resetOut, setMaxSize, setOutputDir, setThreshold, size, toString, writeCacheTo, writeCacheTo, writeCacheTo, writeCacheTo, writeCacheTo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheAndWriteOutputStream

public CacheAndWriteOutputStream(OutputStream stream)
Method Detail

closeFlowthroughStream

public void closeFlowthroughStream()
                            throws IOException
Throws:
IOException

postClose

protected void postClose()
                  throws IOException
Description copied from class: CachedOutputStream
Perform any actions required after stream closure (close the other related stream etc.)

Overrides:
postClose in class CachedOutputStream
Throws:
IOException

getFlowThroughStream

public OutputStream getFlowThroughStream()

onWrite

protected void onWrite()
                throws IOException
Overrides:
onWrite in class CachedOutputStream
Throws:
IOException

write

public void write(int b)
           throws IOException
Overrides:
write in class CachedOutputStream
Throws:
IOException

write

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

write

public void write(byte[] b)
           throws IOException
Overrides:
write in class CachedOutputStream
Throws:
IOException

Apache CXF API

Apache CXF