| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private ByteBuffer | bb
The byte buffer. |
| public final int | |
| private CharBuffer | cb
The char buffer. |
| public final int | |
| private boolean | closed
Flag which indicates if the input buffer is closed. |
| protected B2CConverter | conv
Current byte to char converter. |
| private Request | coyoteRequest
Associated Coyote request. |
| public static final int | |
| private static final Map | encoders
Encoder cache. |
| public final int | |
| private static final Log | |
| private int | markPos
Buffer position. |
| private int | readLimit
Char buffer limit. |
| private final int | size
Buffer size. |
| protected static final StringManager | sm
The string manager for this package. |
| private int | state
State of the output buffer. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | InputBuffer(int
Buffer size to use size)Alternate constructor which allows specifying the initial buffer size. |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| private int | |
| private boolean | |
| private boolean | |
| public void | |
| private void | |
| public void | close()
Implements abstract java. Implements java. Close the input buffer. |
| private static B2CConverter | |
| public void | |
| public ByteBuffer | |
| private void | |
| pack-priv boolean | |
| public boolean | |
| public boolean | |
| private void | |
| public void | mark(int
Limit on the number of characters that may be
read while still preserving the mark. After
reading this many characters, attempting to
reset the stream may fail. readAheadLimit)Overrides java. Marks the present position in the stream. |
| public boolean | markSupported()
Overrides java. Tells whether this stream supports the mark() operation. |
| public int | |
| public int | Returns: an integer specifying the actual number of bytes read, or -1 if the end of the stream is reachedthe ByteBuffer into which bytes are to be written. to)Transfers bytes from the buffer to the specified ByteBuffer. |
| public int | |
| public int | |
| public int | read(char[]
Destination buffer cbuf, int Offset at which to start storing characters off, int Maximum number of characters to read len)Implements abstract java. Reads characters into a portion of an array. |
| public int | |
| public boolean | |
| public int | realReadBytes()
Implements org. Reads new bytes in the byte chunk. |
| public int | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public long | |
| private void |
| bb | back to summary |
|---|---|
| private ByteBuffer bb The byte buffer. | |
| BYTE_STATE | back to summary |
|---|---|
| public final int BYTE_STATE | |
| cb | back to summary |
|---|---|
| private CharBuffer cb The char buffer. | |
| CHAR_STATE | back to summary |
|---|---|
| public final int CHAR_STATE | |
| closed | back to summary |
|---|---|
| private boolean closed Flag which indicates if the input buffer is closed. | |
| conv | back to summary |
|---|---|
| protected B2CConverter conv Current byte to char converter. | |
| coyoteRequest | back to summary |
|---|---|
| private Request coyoteRequest Associated Coyote request. | |
| DEFAULT_BUFFER_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_BUFFER_SIZE | |
| encoders | back to summary |
|---|---|
| private static final Map<Charset, SynchronizedStack<B2CConverter>> encoders Encoder cache. | |
| INITIAL_STATE | back to summary |
|---|---|
| public final int INITIAL_STATE | |
| log | back to summary |
|---|---|
| private static final Log log | |
| markPos | back to summary |
|---|---|
| private int markPos Buffer position. | |
| readLimit | back to summary |
|---|---|
| private int readLimit Char buffer limit. | |
| size | back to summary |
|---|---|
| private final int size Buffer size. | |
| sm | back to summary |
|---|---|
| protected static final StringManager sm The string manager for this package. | |
| state | back to summary |
|---|---|
| private int state State of the output buffer. | |
| InputBuffer | back to summary |
|---|---|
| public InputBuffer() Default constructor. Allocate the buffer with the default buffer size. | |
| InputBuffer | back to summary |
|---|---|
| public InputBuffer(int size) Alternate constructor which allows specifying the initial buffer size.
| |
| available | back to summary |
|---|---|
| public int available() | |
| availableInThisBuffer | back to summary |
|---|---|
| private int availableInThisBuffer() | |
| checkByteBufferEof | back to summary |
|---|---|
| private boolean checkByteBufferEof() throws IOException | |
| checkCharBufferEof | back to summary |
|---|---|
| private boolean checkCharBufferEof() throws IOException | |
| checkConverter | back to summary |
|---|---|
| public void checkConverter() throws IOException | |
| clear | back to summary |
|---|---|
| private void clear(Buffer buffer) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract java. Implements java. Close the input buffer.
| |
| createConverter | back to summary |
|---|---|
| private static B2CConverter createConverter(Charset charset) throws IOException | |
| expand | back to summary |
|---|---|
| public void expand(int size) Implements org.
| |
| getByteBuffer | back to summary |
|---|---|
| public ByteBuffer getByteBuffer() Implements org.
| |
| handleReadException | back to summary |
|---|---|
| private void handleReadException(Exception e) throws IOException | |
| isBlocking | back to summary |
|---|---|
| pack-priv boolean isBlocking() | |
| isFinished | back to summary |
|---|---|
| public boolean isFinished() | |
| isReady | back to summary |
|---|---|
| public boolean isReady() | |
| makeSpace | back to summary |
|---|---|
| private void makeSpace(int count) | |
| mark | back to summary |
|---|---|
| public void mark(int readAheadLimit) throws IOException Overrides java. Doc from java. Marks the present position in the stream. Subsequent calls to reset() will attempt to reposition the stream to this point. Not all character-input streams support the mark() operation.
| |
| markSupported | back to summary |
|---|---|
| public boolean markSupported() Overrides java. Doc from java. Tells whether this stream supports the mark() operation. The default implementation always returns false. Subclasses should override this method.
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException | |
| read | back to summary |
|---|---|
| public int read(ByteBuffer to) throws IOException Transfers bytes from the buffer to the specified ByteBuffer. After the operation the position of the ByteBuffer will be returned to the one before the operation, the limit will be the position incremented by the number of the transferred bytes.
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Doc from java. Reads a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached. Subclasses that intend to support efficient single-character input should override this method.
| |
| read | back to summary |
|---|---|
| public int read(char[] cbuf) throws IOException Overrides java. Doc from java. Reads characters into an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached. If the length of
| |
| read | back to summary |
|---|---|
| public int read(char[] cbuf, int off, int len) throws IOException Implements abstract java. Doc from java. Reads characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached. If
| |
| readByte | back to summary |
|---|---|
| public int readByte() throws IOException | |
| ready | back to summary |
|---|---|
| public boolean ready() throws IOException Overrides java. Doc from java. Tells whether this stream is ready to be read.
| |
| realReadBytes | back to summary |
|---|---|
| public int realReadBytes() throws IOException Implements org. Reads new bytes in the byte chunk.
| |
| realReadChars | back to summary |
|---|---|
| public int realReadChars() throws IOException | |
| recycle | back to summary |
|---|---|
| public void recycle() Recycle the output buffer. | |
| reset | back to summary |
|---|---|
| public void reset() throws IOException Overrides java. Doc from java. Resets the stream. If the stream has been marked, then attempt to reposition it at the mark. If the stream has not been marked, then attempt to reset it in some way appropriate to the particular stream, for example by repositioning it to its starting point. Not all character-input streams support the reset() operation, and some support reset() without supporting mark().
| |
| setByteBuffer | back to summary |
|---|---|
| public void setByteBuffer(ByteBuffer buffer) Implements org.
| |
| setReadListener | back to summary |
|---|---|
| public void setReadListener(ReadListener listener) | |
| setRequest | back to summary |
|---|---|
| public void setRequest(Request coyoteRequest) Associated Coyote request.
| |
| skip | back to summary |
|---|---|
| public long skip(long n) throws IOException Overrides java. Doc from java. Skips characters. This method will block until some characters are available, an I/O error occurs, or the end of the stream is reached. If the stream is already at its end before this method is invoked, then no characters are skipped and zero is returned.
| |
| throwIfClosed | back to summary |
|---|---|
| private void throwIfClosed() throws IOException | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public B2CConverter |
| charset | back to summary |
|---|---|
| private final Charset charset | |
| PrivilegedCreateConverter | back to summary |
|---|---|
| pack-priv PrivilegedCreateConverter(Charset charset) | |
| run | back to summary |
|---|---|
| public B2CConverter run() throws IOException Implements java. Doc from java. Performs the computation. This method will be called by
| |