|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
org.glassfish.grizzly.http.server.io.NIOWriter
public class NIOWriter
Stream implementation for writing character content to an HTTP user-agent.
| Field Summary |
|---|
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
NIOWriter(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
characters. |
void |
write(char[] cbuf)
|
void |
write(char[] cbuf,
int off,
int len)
|
void |
write(int c)
|
void |
write(java.lang.String str)
|
void |
write(java.lang.String str,
int off,
int len)
|
| Methods inherited from class java.io.Writer |
|---|
append, append, append |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NIOWriter(OutputBuffer outputBuffer)
| Method Detail |
|---|
public void write(int c)
throws java.io.IOException
write in class java.io.Writerjava.io.IOException
public void write(char[] cbuf)
throws java.io.IOException
write in class java.io.Writerjava.io.IOException
public void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerjava.io.IOException
public void write(java.lang.String str)
throws java.io.IOException
write in class java.io.Writerjava.io.IOException
public void write(java.lang.String str,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerjava.io.IOException
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.Writerjava.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.Writerjava.io.IOExceptionpublic boolean canWrite(int length)
canWrite in interface NIOOutputSinklength - specifies the number of characters 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
characters.
notifyCanWrite in interface NIOOutputSinkhandler - the WriteHandler that should be notified
when it's possible to write length characters.length - the number of characters 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||