org.restlet.engine.io
Class ReadableChunkingChannel
java.lang.Object
org.restlet.engine.io.WrapperChannel<ReadableByteChannel>
org.restlet.engine.io.ReadableChunkingChannel
- All Implemented Interfaces:
- Closeable, Channel, ReadableByteChannel
public class ReadableChunkingChannel
- extends WrapperChannel<ReadableByteChannel>
- implements ReadableByteChannel
Readable byte channel capable of encoding chunked entities.
Method Summary |
int |
read(ByteBuffer dst)
Reads some bytes and put them into the destination buffer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReadableChunkingChannel
public ReadableChunkingChannel(ReadableByteChannel source,
int maxBufferSize)
- Constructor.
- Parameters:
source
- The source channel.maxBufferSize
- The total available size that can be read from the source
channel.
read
public int read(ByteBuffer dst)
throws IOException
- Reads some bytes and put them into the destination buffer. The bytes come
from the underlying channel.
- Specified by:
read
in interface ReadableByteChannel
- Parameters:
dst
- The destination buffer.
- Returns:
- The number of bytes read, or -1 if the end of the channel has
been reached.
- Throws:
IOException
Copyright © 2005-2013 Restlet.