public class InputBuffer extends java.io.Reader implements ByteChunk.ByteInputChannel, ApplicationBufferHandler
| Modifier and Type | Field and Description |
|---|---|
int |
BYTE_STATE |
int |
CHAR_STATE |
protected B2CConverter |
conv
Current byte to char converter.
|
static int |
DEFAULT_BUFFER_SIZE |
int |
INITIAL_STATE |
protected static StringManager |
sm
The string manager for this package.
|
| Constructor and Description |
|---|
InputBuffer()
Default constructor.
|
InputBuffer(int size)
Alternate constructor which allows specifying the initial buffer size.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
checkConverter() |
void |
close()
Close the input buffer.
|
void |
expand(int size) |
java.nio.ByteBuffer |
getByteBuffer() |
boolean |
isFinished() |
boolean |
isReady() |
void |
mark(int readAheadLimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
int |
read(java.nio.ByteBuffer to)
Transfers bytes from the buffer to the specified ByteBuffer.
|
int |
read(char[] cbuf) |
int |
read(char[] cbuf,
int off,
int len) |
int |
readByte() |
boolean |
ready() |
int |
realReadBytes()
Reads new bytes in the byte chunk.
|
int |
realReadChars() |
void |
recycle()
Recycle the output buffer.
|
void |
reset() |
void |
setByteBuffer(java.nio.ByteBuffer buffer) |
void |
setReadListener(ReadListener listener) |
void |
setRequest(Request coyoteRequest)
Associated Coyote request.
|
long |
skip(long n) |
protected static final StringManager sm
public static final int DEFAULT_BUFFER_SIZE
public final int INITIAL_STATE
public final int CHAR_STATE
public final int BYTE_STATE
protected B2CConverter conv
public InputBuffer()
public InputBuffer(int size)
size - Buffer size to usepublic void setRequest(Request coyoteRequest)
coyoteRequest - Associated Coyote requestpublic void recycle()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.Readerjava.io.IOException - An underlying IOException occurredpublic int available()
public void setReadListener(ReadListener listener)
public boolean isFinished()
public boolean isReady()
public int realReadBytes()
throws java.io.IOException
realReadBytes in interface ByteChunk.ByteInputChanneljava.io.IOException - An underlying IOException occurredpublic int readByte()
throws java.io.IOException
java.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic int read(java.nio.ByteBuffer to)
throws java.io.IOException
to - the ByteBuffer into which bytes are to be written.java.io.IOException - if an input or output exception has occurredpublic int realReadChars()
throws java.io.IOException
java.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionpublic int read(char[] cbuf)
throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionpublic int read(char[] cbuf,
int off,
int len)
throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.Readerjava.io.IOExceptionpublic boolean ready()
throws java.io.IOException
ready in class java.io.Readerjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.Readerpublic void mark(int readAheadLimit)
throws java.io.IOException
mark in class java.io.Readerjava.io.IOExceptionpublic void reset()
throws java.io.IOException
reset in class java.io.Readerjava.io.IOExceptionpublic void checkConverter()
throws java.io.IOException
java.io.IOExceptionpublic void setByteBuffer(java.nio.ByteBuffer buffer)
setByteBuffer in interface ApplicationBufferHandlerpublic java.nio.ByteBuffer getByteBuffer()
getByteBuffer in interface ApplicationBufferHandlerpublic void expand(int size)
expand in interface ApplicationBufferHandlerCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.