org.apache.catalina.connector
public class InputBuffer extends Reader implements ByteChunk.ByteInputChannel, CharChunk.CharInputChannel, CharChunk.CharOutputChannel
| Field Summary | |
|---|---|
| int | BYTE_STATE |
| protected B2CConverter | conv
Current byte to char converter. |
| int | CHAR_STATE |
| static int | DEFAULT_BUFFER_SIZE |
| static String | DEFAULT_ENCODING |
| protected HashMap | encoders
List of encoders. |
| int | INITIAL_STATE |
| protected static StringManager | sm
The string manager for this package. |
| Constructor Summary | |
|---|---|
| InputBuffer()
Default constructor. | |
| InputBuffer(int size)
Alternate constructor which allows specifying the initial buffer size.
| |
| Method Summary | |
|---|---|
| int | available() |
| void | checkConverter() |
| void | clearEncoders()
Clear cached encoders (to save memory for Comet requests). |
| void | close()
Close the input buffer.
|
| Request | getRequest()
Get associated Coyote request.
|
| void | mark(int readAheadLimit) |
| boolean | markSupported() |
| int | read(byte[] b, int off, int len) |
| int | read() |
| int | read(char[] cbuf) |
| int | read(char[] cbuf, int off, int len) |
| int | readByte() |
| boolean | ready() |
| int | realReadBytes(byte[] cbuf, int off, int len)
Reads new bytes in the byte chunk.
|
| int | realReadChars(char[] cbuf, int off, int len) |
| void | realWriteChars(char[] c, int off, int len)
Since the converter will use append, it is possible to get chars to
be removed from the buffer for "writing". |
| void | recycle()
Recycle the output buffer. |
| void | reset() |
| protected void | setConverter() |
| void | setEncoding(String s) |
| void | setRequest(Request coyoteRequest)
Associated Coyote request.
|
| long | skip(long n) |
Parameters: size Buffer size to use
Throws: IOException An underlying IOException occurred
Returns: the associated Coyote request
Parameters: cbuf Byte buffer to be written to the response off Offset len Length
Throws: IOException An underlying IOException occurred
Parameters: coyoteRequest Associated Coyote request