|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.glassfish.grizzly.http.server.io.NIOInputStream
public class NIOInputStream
Stream implementation to read binary request content.
| Constructor Summary | |
|---|---|
NIOInputStream(InputBuffer inputBuffer)
Constructs a new NIOInputStream using the specified
inputBuffer |
|
| Method Summary | |
|---|---|
int |
available()
|
void |
close()
|
Buffer |
getBuffer()
Returns the underlying Buffer that backs this
NIOInputSource. |
boolean |
isFinished()
|
boolean |
isReady()
|
void |
mark(int readlimit)
|
boolean |
markSupported()
This InputStream implementation supports marking. |
boolean |
notifyAvailable(ReadHandler handler)
Notify the specified ReadHandler when any number of bytes
can be read without blocking. |
boolean |
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(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
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 NIOInputStream(InputBuffer inputBuffer)
NIOInputStream using the specified
inputBuffer
inputBuffer - the InputBuffer from which binary content
will be supplied| Method Detail |
|---|
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public int read(byte[] b)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOException
public int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.InputStreamjava.io.IOExceptionpublic void mark(int readlimit)
mark in class java.io.InputStream
public void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionpublic boolean markSupported()
InputStream implementation supports marking.
markSupported in class java.io.InputStreamtruepublic boolean 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.
true if the specified handler has
been accepted and will be notified as data becomes available to write,
otherwise returns false which means data is available to
be read without blocking.- See Also:
ReadHandler.onDataAvailable(),
ReadHandler.onAllDataRead()
public boolean 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.
true if the specified handler has
been accepted and will be notified as data becomes available to write,
otherwise returns false which means data is available to
be read without blocking.- See Also:
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.public Buffer getBuffer()
Returns the underlying Buffer that backs this
NIOInputSource.
getBuffer in interface BinaryNIOInputSourceBuffer that backs this
NIOInputSource.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||