|
||||||||||
| 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(String str)
|
void |
write(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 IOException
write in class WriterIOException
public void write(char[] cbuf)
throws IOException
write in class WriterIOException
public void write(char[] cbuf,
int off,
int len)
throws IOException
write in class WriterIOException
public void write(String str)
throws IOException
write in class WriterIOException
public void write(String str,
int off,
int len)
throws IOException
write in class WriterIOException
public void flush()
throws IOException
flush in interface Flushableflush in class WriterIOException
public void close()
throws IOException
close in interface Closeableclose in class WriterIOExceptionpublic 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||