public class ByteBufferQueuedHttpInput extends QueuedHttpInput<ByteBuffer>
An implementation of HttpInput using ByteBuffer
as items.
HttpInput.State
Constructor and Description |
---|
ByteBufferQueuedHttpInput() |
Modifier and Type | Method and Description |
---|---|
protected void |
consume(ByteBuffer item,
int length)
Consumes the given content.
|
protected int |
get(ByteBuffer item,
byte[] buffer,
int offset,
int length)
Copies the given content into the given byte buffer.
|
protected void |
onContentConsumed(ByteBuffer item)
Callback that signals that the given content has been consumed.
|
protected int |
remaining(ByteBuffer item) |
blockForContent, content, earlyEOF, messageComplete, nextContent, recycle
available, consumeAll, failed, getContentRead, getNextContent, init, isAsync, isEarlyEOF, isEOF, isFinished, isReady, lock, onAsyncRead, read, read, run, setReadListener, unready
readLine
close, mark, markSupported, read, reset, skip
protected int remaining(ByteBuffer item)
remaining
in class HttpInput<ByteBuffer>
item
- the contentprotected int get(ByteBuffer item, byte[] buffer, int offset, int length)
HttpInput
get
in class HttpInput<ByteBuffer>
item
- the content to copy frombuffer
- the buffer to copy intooffset
- the buffer offset to start copying fromlength
- the space available in the bufferprotected void consume(ByteBuffer item, int length)
HttpInput
consume
in class HttpInput<ByteBuffer>
item
- the content to consumelength
- the number of bytes to consumeprotected void onContentConsumed(ByteBuffer item)
QueuedHttpInput
onContentConsumed
in class QueuedHttpInput<ByteBuffer>
item
- the consumed contentCopyright © 1995-2015 Webtide. All Rights Reserved.