public class ByteArrayInputStreamCache extends FilterInputStream implements StreamCache
in
DEFAULT_SPOOL_THRESHOLD
Constructor and Description |
---|
ByteArrayInputStreamCache(ByteArrayInputStream in) |
Modifier and Type | Method and Description |
---|---|
boolean |
inMemory()
Whether this
StreamCache is in memory only or
spooled to persistent storage such as files. |
long |
length()
Gets the length of the cached stream.
|
void |
reset()
Resets the StreamCache for a new stream consumption.
|
void |
writeTo(OutputStream os)
Writes the stream to the given output
|
available, close, mark, markSupported, read, read, read, skip
public ByteArrayInputStreamCache(ByteArrayInputStream in)
public void reset()
StreamCache
reset
in interface StreamCache
reset
in class FilterInputStream
public void writeTo(OutputStream os) throws IOException
StreamCache
writeTo
in interface StreamCache
os
- the destination to write toIOException
- is thrown if write failspublic boolean inMemory()
StreamCache
StreamCache
is in memory only or
spooled to persistent storage such as files.inMemory
in interface StreamCache
public long length()
StreamCache
length
in interface StreamCache
Apache Camel