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
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
onWrite()
protected void
Perform any actions required after stream closure (close the other related stream etc.)void
setCacheLimit
(long l) 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, 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.OutputStream
nullOutputStream
-
Constructor Details
-
CacheAndWriteOutputStream
-
-
Method Details
-
setCacheLimit
public void setCacheLimit(long l) -
closeFlowthroughStream
- Throws:
IOException
-
postClose
Description copied from class:CachedOutputStream
Perform any actions required after stream closure (close the other related stream etc.)- Overrides:
postClose
in classCachedOutputStream
- Throws:
IOException
-
getFlowThroughStream
-
onWrite
- Overrides:
onWrite
in classCachedOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classCachedOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classCachedOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classCachedOutputStream
- Throws:
IOException
-