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, skip
public NettyChannelBufferStreamCache(io.netty.buffer.ByteBuf buffer)
public boolean markSupported()
markSupported
in class InputStream
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b) throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public void reset()
reset
in interface org.apache.camel.StreamCache
reset
in class InputStream
public void writeTo(OutputStream os) throws IOException
writeTo
in interface org.apache.camel.StreamCache
IOException
public org.apache.camel.StreamCache copy(org.apache.camel.Exchange exchange) throws IOException
copy
in interface org.apache.camel.StreamCache
IOException
public boolean inMemory()
inMemory
in interface org.apache.camel.StreamCache
public long length()
length
in interface org.apache.camel.StreamCache
public void release()
Apache Camel