public final class NettyChannelBufferStreamCache extends InputStream implements org.apache.camel.StreamCache
ChannelBuffer
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(org.jboss.netty.buffer.ChannelBuffer buffer) |
Modifier and Type | Method and Description |
---|---|
boolean |
inMemory() |
long |
length() |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
void |
writeTo(OutputStream os) |
available, close, mark, skip
public NettyChannelBufferStreamCache(org.jboss.netty.buffer.ChannelBuffer 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 boolean inMemory()
inMemory
in interface org.apache.camel.StreamCache
public long length()
length
in interface org.apache.camel.StreamCache
Apache Camel