org.apache.http.io.BufferInfo
, org.apache.http.io.SessionInputBuffer
public class BoundSessionInputBuffer
extends org.apache.http.impl.io.SessionInputBufferImpl
SessionInputBuffer
implementation that bounds a SessionInputBuffer
(and hence its
buffered stream) so that no more than a specified amount of bytes will be read (from its stream), and
keeps track of the number of read bytes.Constructor | Description |
---|---|
BoundSessionInputBuffer(org.apache.http.io.SessionInputBuffer buffer,
long length) |
Creates a new
SessionInputBuffer bounded to a given maximum length. |
Modifier and Type | Method | Description |
---|---|---|
void |
consume() |
Consumes the remaining bytes (of the buffered stream).
|
long |
remaining() |
Returns the number of unread bytes (in the buffered stream).
|
public BoundSessionInputBuffer(org.apache.http.io.SessionInputBuffer buffer, long length)
SessionInputBuffer
bounded to a given maximum length.buffer
- the buffer to wraplength
- the maximum number of bytes to read (from the buffered stream).