Package org.apache.cxf.io
Class CacheAndWriteOutputStream
- java.lang.Object
- 
- java.io.OutputStream
- 
- org.apache.cxf.io.CachedOutputStream
- 
- org.apache.cxf.io.CacheAndWriteOutputStream
 
 
 
- 
- All Implemented Interfaces:
- Closeable,- Flushable,- AutoCloseable
 
 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.CachedOutputStreamcurrentStream, outputLocked
 
- 
 - 
Constructor SummaryConstructors Constructor Description CacheAndWriteOutputStream(OutputStream stream)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseFlowthroughStream()OutputStreamgetFlowThroughStream()protected voidonWrite()protected voidpostClose()Perform any actions required after stream closure (close the other related stream etc.)voidsetCacheLimit(long l)voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)- 
Methods inherited from class org.apache.cxf.io.CachedOutputStreamclose, copyStream, deregisterCallback, doClose, doFlush, equals, flush, getBytes, getCallbacks, getInputStream, getOut, getTempFile, getThreshold, hashCode, holdTempFile, isThresholdSysPropSet, lockOutputStream, registerCallback, releaseTempFileHold, resetOut, setCipherTransformation, setDefaultCipherTransformation, setDefaultMaxSize, setDefaultThreshold, setMaxSize, setOutputDir, setThreshold, size, toString, writeCacheTo, writeCacheTo, writeCacheTo, writeCacheTo, writeCacheTo
 - 
Methods inherited from class java.io.OutputStreamnullOutputStream
 
- 
 
- 
- 
- 
Constructor Detail- 
CacheAndWriteOutputStreampublic CacheAndWriteOutputStream(OutputStream stream) 
 
- 
 - 
Method Detail- 
setCacheLimitpublic void setCacheLimit(long l) 
 - 
closeFlowthroughStreampublic void closeFlowthroughStream() throws IOException- Throws:
- IOException
 
 - 
postCloseprotected void postClose() throws IOExceptionDescription copied from class:CachedOutputStreamPerform any actions required after stream closure (close the other related stream etc.)- Overrides:
- postClosein class- CachedOutputStream
- Throws:
- IOException
 
 - 
getFlowThroughStreampublic OutputStream getFlowThroughStream() 
 - 
onWriteprotected void onWrite() throws IOException- Overrides:
- onWritein class- CachedOutputStream
- Throws:
- IOException
 
 - 
writepublic void write(int b) throws IOException- Overrides:
- writein class- CachedOutputStream
- Throws:
- IOException
 
 - 
writepublic void write(byte[] b, int off, int len) throws IOException- Overrides:
- writein class- CachedOutputStream
- Throws:
- IOException
 
 - 
writepublic void write(byte[] b) throws IOException- Overrides:
- writein class- CachedOutputStream
- Throws:
- IOException
 
 
- 
 
-