org.apache.camel.component.netty.http
Class NettyChannelBufferStreamCache
java.lang.Object
java.io.InputStream
org.apache.camel.component.netty.http.NettyChannelBufferStreamCache
- All Implemented Interfaces:
- Closeable, org.apache.camel.StreamCache
public final class NettyChannelBufferStreamCache
- extends InputStream
- implements org.apache.camel.StreamCache
A 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.
| Fields inherited from interface org.apache.camel.StreamCache |
DEFAULT_SPOOL_THRESHOLD |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NettyChannelBufferStreamCache
public NettyChannelBufferStreamCache(org.jboss.netty.buffer.ChannelBuffer buffer)
markSupported
public boolean markSupported()
- Overrides:
markSupported in class InputStream
read
public int read()
throws IOException
- Specified by:
read in class InputStream
- Throws:
IOException
read
public int read(byte[] b)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
reset
public void reset()
- Specified by:
reset in interface org.apache.camel.StreamCache- Overrides:
reset in class InputStream
writeTo
public void writeTo(OutputStream os)
throws IOException
- Specified by:
writeTo in interface org.apache.camel.StreamCache
- Throws:
IOException
inMemory
public boolean inMemory()
- Specified by:
inMemory in interface org.apache.camel.StreamCache
length
public long length()
- Specified by:
length in interface org.apache.camel.StreamCache
Apache Camel