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:
java.io.Closeable, java.io.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
 
Constructor Summary
CacheAndWriteOutputStream(java.io.OutputStream stream)
           
 
Method Summary
protected  void doClose()
          Perform any actions required on stream closure (handle response etc.)
protected  void onWrite()
           
 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, copyStreamWithBase64Encoding, deregisterCallback, dispose, doFlush, equals, flush, getCallbacks, getInputStream, getOut, getTempFile, hashCode, registerCallback, resetOut, setOutputDir, setThreshold, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheAndWriteOutputStream

public CacheAndWriteOutputStream(java.io.OutputStream stream)
Method Detail

doClose

protected void doClose()
                throws java.io.IOException
Description copied from class: CachedOutputStream
Perform any actions required on stream closure (handle response etc.)

Overrides:
doClose in class CachedOutputStream
Throws:
java.io.IOException

onWrite

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

write

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

write

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

write

public void write(byte[] b)
           throws java.io.IOException
Overrides:
write in class CachedOutputStream
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.