|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Reader
org.glassfish.grizzly.http.server.io.NIOReader
public class NIOReader
Character stream implementation used to read character-based request content.
| Field Summary |
|---|
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
NIOReader(InputBuffer inputBuffer)
Constructs a new NIOReader using the specified
inputBuffer |
|
| Method Summary | |
|---|---|
void |
close()
|
boolean |
isFinished()
|
boolean |
isReady()
|
void |
mark(int readAheadLimit)
|
boolean |
markSupported()
This Reader implementation does not support marking. |
void |
notifyAvailable(ReadHandler handler)
Notify the specified ReadHandler when any number of bytes
can be read without blocking. |
void |
notifyAvailable(ReadHandler handler,
int size)
Notify the specified ReadHandler when the number of bytes that
can be read without blocking is greater or equal to the specified
size. |
int |
read()
|
int |
read(char[] cbuf)
|
int |
read(char[] cbuf,
int off,
int len)
|
int |
read(CharBuffer target)
|
boolean |
ready()
|
int |
readyData()
|
void |
reset()
|
long |
skip(long n)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NIOReader(InputBuffer inputBuffer)
NIOReader using the specified
inputBuffer
inputBuffer - the InputBuffer from which character
content will be supplied| Method Detail |
|---|
public int read(CharBuffer target)
throws IOException
read in interface Readableread in class ReaderIOException
public int read()
throws IOException
read in class ReaderIOException
public int read(char[] cbuf)
throws IOException
read in class ReaderIOException
public long skip(long n)
throws IOException
skip in class ReaderIOException
public boolean ready()
throws IOException
ready in class ReaderIOExceptionpublic boolean markSupported()
Reader implementation does not support marking.
markSupported in class Readerfalse
public void mark(int readAheadLimit)
throws IOException
mark in class ReaderIOException
public void reset()
throws IOException
reset in class ReaderIOException
public int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOException
public void close()
throws IOException
close in interface Closeableclose in class ReaderIOExceptionpublic void notifyAvailable(ReadHandler handler)
Notify the specified ReadHandler when any number of bytes
can be read without blocking.
Invoking this method is equivalent to calling: notifyAvailable(handler, 0).
notifyAvailable in interface NIOInputSourcehandler - the ReadHandler to notify.ReadHandler.onDataAvailable(),
ReadHandler.onAllDataRead()
public void notifyAvailable(ReadHandler handler,
int size)
Notify the specified ReadHandler when the number of bytes that
can be read without blocking is greater or equal to the specified
size.
notifyAvailable in interface NIOInputSourcehandler - the ReadHandler to notify.size - the least number of bytes that must be available before
the ReadHandler is invoked. If size is 0, the
handler will be notified as soon as data is available no matter the
size.ReadHandler.onDataAvailable(),
ReadHandler.onAllDataRead()public boolean isFinished()
isFinished in interface NIOInputSourcetrue when all data for this particular request
has been read, otherwise returns false.public int readyData()
readyData in interface NIOInputSourcepublic boolean isReady()
isReady in interface NIOInputSourcetrue if data can be obtained without blocking,
otherwise returns false.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||