public interface StreamCache
StreamCachingStrategy
for determining if/how to wrap a stream-based message.
The Camel routing engine uses the CamelInternalProcessor.StreamCachingAdvice
to apply the stream cache during routing.| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_SPOOL_THRESHOLD |
| 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
|
static final long DEFAULT_SPOOL_THRESHOLD
void reset()
void writeTo(OutputStream os) throws IOException
os - the destination to write toIOException - is thrown if write failsboolean inMemory()
StreamCache is in memory only or
spooled to persistent storage such as files.long length()
Apache Camel