|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
org.glassfish.grizzly.http.server.io.NIOOutputStream
public class NIOOutputStream
Stream implementation for writing binary content to an HTTP user-agent.
| Constructor Summary | |
|---|---|
NIOOutputStream(OutputBuffer outputBuffer)
|
|
| Method Summary | |
|---|---|
boolean |
canWrite(int length)
|
void |
close()
|
void |
flush()
|
boolean |
notifyCanWrite(WriteHandler handler,
int length)
Instructs the NIOOutputSink to invoke the provided
WriteHandler when it is possible to write length
bytes. |
void |
write(Buffer buffer)
Writes the contents of the specified Buffer. |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NIOOutputStream(OutputBuffer outputBuffer)
| Method Detail |
|---|
public void write(int b)
throws IOException
write in class OutputStreamIOException
public void write(byte[] b)
throws IOException
write in class OutputStreamIOException
public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOException
public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOException
public void close()
throws IOException
close in interface Closeableclose in class OutputStreamIOExceptionpublic boolean canWrite(int length)
canWrite in interface NIOOutputSinklength - specifies the number of bytes that require writing
true if a write to this NIOOutputSink
will succeed, otherwise returns false.
public boolean notifyCanWrite(WriteHandler handler,
int length)
NIOOutputSink to invoke the provided
WriteHandler when it is possible to write length
bytes.
Note that once the WriteHandler has been notified, it will not
be considered for notification again at a later point in time.
notifyCanWrite in interface NIOOutputSinkhandler - the WriteHandler that should be notified
when it's possible to write length bytes.length - the number of bytes that require writing.
true if the specified handler has
been accepted and will be notified as it becomes possible to write,
otherwise returns false which means data is currently
available to write without blocking.
public void write(Buffer buffer)
throws IOException
Buffer.
write in interface BinaryNIOOutputSinkbuffer - the to write
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||