|
||||||||||
| 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 java.io.IOException
write in class java.io.OutputStreamjava.io.IOException
public void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOExceptionpublic 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 or that there is no limit as
to how much data can be pending to be written.
public void write(Buffer buffer)
throws java.io.IOException
Buffer.
write in interface BinaryNIOOutputSinkbuffer - the to write
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||