public final class InputStreamCache extends ByteArrayInputStream implements StreamCache
StreamCache for caching using an in-memory byte array.buf, count, mark, posDEFAULT_SPOOL_THRESHOLD| Constructor and Description |
|---|
InputStreamCache(byte[] data) |
InputStreamCache(byte[] data,
int count) |
| Modifier and Type | Method and Description |
|---|---|
StreamCache |
copy()
Create a copy of the stream.
|
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 |
writeTo(OutputStream os)
Writes the stream to the given output
|
available, close, mark, markSupported, read, read, reset, skipreadclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresetpublic InputStreamCache(byte[] data)
public InputStreamCache(byte[] data,
int count)
public void writeTo(OutputStream os) throws IOException
StreamCachewriteTo in interface StreamCacheos - the destination to write toIOException - is thrown if write failspublic StreamCache copy()
StreamCachecopy in interface StreamCachepublic boolean inMemory()
StreamCacheStreamCache is in memory only or
spooled to persistent storage such as files.inMemory in interface StreamCachepublic long length()
StreamCachelength in interface StreamCacheApache Camel