| java.lang.Object java.io.Reader org.apache.coyote.tomcat5.InputBuffer
InputBuffer | public class InputBuffer extends Reader implements ByteChunk.ByteInputChannel,CharChunk.CharInputChannel,CharChunk.CharOutputChannel(Code) | | The buffer used by Tomcat request. This is a derivative of the Tomcat 3.3
OutputBuffer, adapted to handle input instead of output. This allows
complete recycling of the facade objects (the ServletInputStream and the
BufferedReader).
author: Remy Maucherat |
Constructor Summary | |
public | InputBuffer() Default constructor. | public | InputBuffer(int size) Alternate constructor which allows specifying the initial buffer size. |
Method Summary | |
public int | available() | public void | checkConverter() | public void | close() Close the input buffer. | public Request | getRequest() Get associated Coyote request. | protected void | log(String s) | public void | mark(int readAheadLimit) | public boolean | markSupported() | public int | read(byte[] b, int off, int len) | public int | read() | public int | read(char[] cbuf) | public int | read(char[] cbuf, int off, int len) | public int | readByte() | public boolean | ready() | public int | realReadBytes(byte cbuf, int off, int len) Reads new bytes in the byte chunk. | public int | realReadChars(char cbuf, int off, int len) | public 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". | public void | recycle() Recycle the output buffer. | public void | reset() | protected void | setConverter() | public void | setEncoding(String s) | public void | setRequest(Request coyoteRequest) Associated Coyote request. | public long | skip(long n) |
BYTE_STATE | final public int BYTE_STATE(Code) | | |
CHAR_STATE | final public int CHAR_STATE(Code) | | |
DEFAULT_BUFFER_SIZE | final public static int DEFAULT_BUFFER_SIZE(Code) | | |
DEFAULT_ENCODING | final public static String DEFAULT_ENCODING(Code) | | |
INITIAL_STATE | final public int INITIAL_STATE(Code) | | |
conv | protected B2CConverter conv(Code) | | Current byte to char converter.
|
debug | final static int debug(Code) | | |
InputBuffer | public InputBuffer()(Code) | | Default constructor. Allocate the buffer with the default buffer size.
|
InputBuffer | public InputBuffer(int size)(Code) | | Alternate constructor which allows specifying the initial buffer size.
Parameters: size - Buffer size to use |
getRequest | public Request getRequest()(Code) | | Get associated Coyote request.
the associated Coyote request |
markSupported | public boolean markSupported()(Code) | | |
realReadBytes | public int realReadBytes(byte cbuf, int off, int len) throws IOException(Code) | | Reads new bytes in the byte chunk.
Parameters: buf - Byte buffer to be written to the response Parameters: off - Offset Parameters: cnt - Length throws: IOException - An underlying IOException occurred |
realReadChars | public int realReadChars(char cbuf, int off, int len) throws IOException(Code) | | |
realWriteChars | public void realWriteChars(char c, int off, int len) throws IOException(Code) | | Since the converter will use append, it is possible to get chars to
be removed from the buffer for "writing". Since the chars have already
been read before, they are ignored. If a mark was set, then the
mark is lost.
|
recycle | public void recycle()(Code) | | Recycle the output buffer.
|
setRequest | public void setRequest(Request coyoteRequest)(Code) | | Associated Coyote request.
Parameters: coyoteRequest - Associated Coyote request |
|
|