public class InputBuffer extends Reader implements org.glassfish.grizzly.http.util.ByteChunk.ByteInputChannel, org.glassfish.grizzly.http.util.CharChunk.CharInputChannel, org.glassfish.grizzly.http.util.CharChunk.CharOutputChannel
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BUFFER_SIZE |
| 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.
|
org.glassfish.grizzly.http.server.Request |
getRequest()
Get associated Grizzly request.
|
boolean |
isFinished() |
boolean |
isReady() |
void |
mark(int readAheadLimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
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() |
void |
setEncoding(String encoding) |
void |
setReadListener(javax.servlet.ReadListener readListener) |
void |
setRequest(org.glassfish.grizzly.http.server.Request grizzlyRequest)
Associated Grizzly request.
|
void |
setRequest(Request request) |
long |
skip(long n) |
public static final int DEFAULT_BUFFER_SIZE
public InputBuffer()
public InputBuffer(int size)
size - Buffer size to usepublic void setRequest(org.glassfish.grizzly.http.server.Request grizzlyRequest)
grizzlyRequest - Associated Grizzly requestpublic void setRequest(Request request)
public org.glassfish.grizzly.http.server.Request getRequest()
public void recycle()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ReaderIOException - An underlying IOException occurredpublic int available()
throws IOException
IOExceptionpublic int realReadBytes(byte[] cbuf,
int off,
int len)
throws IOException
realReadBytes in interface org.glassfish.grizzly.http.util.ByteChunk.ByteInputChannelcbuf - Byte buffer to be written to the responseoff - Offsetlen - LengthIOException - An underlying IOException occurredpublic int readByte()
throws IOException
IOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
IOExceptionpublic boolean isFinished()
public boolean isReady()
public void setReadListener(javax.servlet.ReadListener readListener)
public void realWriteChars(char[] c,
int off,
int len)
throws IOException
realWriteChars in interface org.glassfish.grizzly.http.util.CharChunk.CharOutputChannelIOExceptionpublic void setEncoding(String encoding)
public int realReadChars(char[] cbuf,
int off,
int len)
throws IOException
realReadChars in interface org.glassfish.grizzly.http.util.CharChunk.CharInputChannelIOExceptionpublic int read()
throws IOException
read in class ReaderIOExceptionpublic int read(char[] cbuf)
throws IOException
read in class ReaderIOExceptionpublic int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOExceptionpublic long skip(long n)
throws IOException
skip in class ReaderIOExceptionpublic boolean ready()
throws IOException
ready in class ReaderIOExceptionpublic boolean markSupported()
markSupported in class Readerpublic void mark(int readAheadLimit)
throws IOException
mark in class ReaderIOExceptionpublic void reset()
throws IOException
reset in class ReaderIOExceptionpublic void checkConverter()
throws IOException
IOExceptionCopyright © 2017. All rights reserved.