Deprecated
(4.3) use SessionInputBufferImpl
InputStream. This class buffers input data in
an internal byte array for optimal input performance.
readLine(CharArrayBuffer) and readLine() methods of this
class treat a lone LF as valid line delimiters in addition to CR-LF required
by the HTTP specification.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private byte[] | |
| private int | |
| private int | |
| private CharBuffer | |
| private Charset | |
| private CharsetDecoder | |
| private InputStream | |
| private ByteArrayBuffer | |
| private int | |
| private HttpTransportMetricsImpl | |
| private int | |
| private CodingErrorAction | |
| private CodingErrorAction |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| public int | available()
Implements org. |
| public int | |
| protected HttpTransportMetricsImpl | |
| protected int | |
| public HttpTransportMetrics | getMetrics()
Implements org. HttpTransportMetrics for this session buffer.
|
| private int | handleDecodingResult(final CoderResult result, final CharArrayBuffer charbuffer, final ByteBuffer bbuf)
|
| protected boolean | |
| protected void | init(final InputStream
the source input stream. inputStream, final int the size of the internal buffer. bufferSize, final HttpParams HTTP parameters. params)
Deprecated
as a consequence of
Initializes this session input buffer.
HttpParams being deprecated.
|
| public int | |
| private int | Returns: HTTP line as a stringReads a complete line of characters up to a line delimiter from this session buffer. |
| private int | |
| private int | |
| public int | read()
Implements org. |
| public int | read(final byte[]
the buffer into which the data is read. b, final int the start offset in array off, final int b
at which the data is written.the maximum number of bytes to read. len)Implements org. len bytes of data from the session buffer into
an array of bytes.
|
| public int | read(final byte[]
the buffer into which the data is read. b)Implements org. b.
|
| public int | Returns: one line of charactersthe line buffer. charbuffer)Implements org. |
| public String | readLine()
Implements org. |
| ascii | back to summary |
|---|---|
| private boolean ascii | |
| buffer | back to summary |
|---|---|
| private byte[] buffer | |
| bufferLen | back to summary |
|---|---|
| private int bufferLen | |
| bufferPos | back to summary |
|---|---|
| private int bufferPos | |
| cbuf | back to summary |
|---|---|
| private CharBuffer cbuf | |
| charset | back to summary |
|---|---|
| private Charset charset | |
| decoder | back to summary |
|---|---|
| private CharsetDecoder decoder | |
| inStream | back to summary |
|---|---|
| private InputStream inStream | |
| lineBuffer | back to summary |
|---|---|
| private ByteArrayBuffer lineBuffer | |
| maxLineLen | back to summary |
|---|---|
| private int maxLineLen | |
| metrics | back to summary |
|---|---|
| private HttpTransportMetricsImpl metrics | |
| minChunkLimit | back to summary |
|---|---|
| private int minChunkLimit | |
| onMalformedCharAction | back to summary |
|---|---|
| private CodingErrorAction onMalformedCharAction | |
| onUnmappableCharAction | back to summary |
|---|---|
| private CodingErrorAction onUnmappableCharAction | |
| AbstractSessionInputBuffer | back to summary |
|---|---|
| public AbstractSessionInputBuffer() | |
| appendDecoded | back to summary |
|---|---|
| private int appendDecoded(final CharArrayBuffer charbuffer, final ByteBuffer bbuf) throws IOException | |
| available | back to summary |
|---|---|
| public int available() Implements org. Doc from org. Returns available space in the buffer.
| |
| capacity | back to summary |
|---|---|
| public int capacity() Implements org. Doc from org. Returns total capacity of the buffer
| |
| createTransportMetrics | back to summary |
|---|---|
protected HttpTransportMetricsImpl createTransportMetrics()
| |
| fillBuffer | back to summary |
|---|---|
| protected int fillBuffer() throws IOException | |
| getMetrics | back to summary |
|---|---|
| public HttpTransportMetrics getMetrics() Implements org. Doc from org. Returns
| |
| handleDecodingResult | back to summary |
|---|---|
| private int handleDecodingResult(final CoderResult result, final CharArrayBuffer charbuffer, final ByteBuffer bbuf) throws IOException | |
| hasBufferedData | back to summary |
|---|---|
| protected boolean hasBufferedData() | |
| init | back to summary |
|---|---|
| protected void init(final InputStream inputStream, final int bufferSize, final HttpParams params)
Deprecated as a consequence of Initializes this session input buffer.
| |
| length | back to summary |
|---|---|
| public int length() Implements org. Doc from org. Return length data stored in the buffer
| |
| lineFromLineBuffer | back to summary |
|---|---|
| private int lineFromLineBuffer(final CharArrayBuffer charbuffer) throws IOException Reads a complete line of characters up to a line delimiter from this
session buffer. The line delimiter itself is discarded. If no char is
available because the end of the stream has been reached,
This method treats a lone LF as a valid line delimiters in addition to CR-LF required by the HTTP specification.
| |
| lineFromReadBuffer | back to summary |
|---|---|
| private int lineFromReadBuffer(final CharArrayBuffer charbuffer, final int position) throws IOException | |
| locateLF | back to summary |
|---|---|
| private int locateLF() | |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements org. Doc from org. Reads the next byte of data from this session buffer. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(final byte[] b, final int off, final int len) throws IOException Implements org. Doc from org. Reads up to This method blocks until input data is available, end of file is detected, or an exception is thrown. If
| |
| read | back to summary |
|---|---|
| public int read(final byte[] b) throws IOException Implements org. Doc from org. Reads some number of bytes from the session buffer and stores them into
the buffer array
| |
| readLine | back to summary |
|---|---|
| public int readLine(final CharArrayBuffer charbuffer) throws IOException Implements org. Reads a complete line of characters up to a line delimiter from this
session buffer into the given line buffer. The number of chars actually
read is returned as an integer. The line delimiter itself is discarded.
If no char is available because the end of the stream has been reached,
the value This method treats a lone LF as a valid line delimiters in addition to CR-LF required by the HTTP specification.
| |
| readLine | back to summary |
|---|---|
| public String readLine() throws IOException Implements org. Doc from org. Reads a complete line of characters up to a line delimiter from this
session buffer. The line delimiter itself is discarded. If no char is
available because the end of the stream has been reached,
The choice of a char encoding and line delimiter sequence is up to the specific implementations of this interface.
| |