public final class NettyChannelBufferStreamCache extends InputStream implements org.apache.camel.StreamCache
ByteBuf which is exposed as an InputStream which makes it very easy to use by Camel and other Camel
components. Also supported is StreamCache which allows the data to be re-read for example when doing content
based routing with XPath.| Constructor and Description |
|---|
NettyChannelBufferStreamCache(io.netty.buffer.ByteBuf buffer) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.StreamCache |
copy(org.apache.camel.Exchange exchange) |
boolean |
inMemory() |
long |
length() |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
release()
Release the buffer when we are done using it.
|
void |
reset() |
void |
writeTo(OutputStream os) |
available, close, mark, skippublic NettyChannelBufferStreamCache(io.netty.buffer.ByteBuf buffer)
public boolean markSupported()
markSupported in class InputStreampublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic void reset()
reset in interface org.apache.camel.StreamCachereset in class InputStreampublic void writeTo(OutputStream os) throws IOException
writeTo in interface org.apache.camel.StreamCacheIOExceptionpublic org.apache.camel.StreamCache copy(org.apache.camel.Exchange exchange)
throws IOException
copy in interface org.apache.camel.StreamCacheIOExceptionpublic boolean inMemory()
inMemory in interface org.apache.camel.StreamCachepublic long length()
length in interface org.apache.camel.StreamCachepublic void release()
Apache Camel