|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface NIOOutputSink
This interface defines methods to allow an OutputStream or
Writer to allow the developer to check with the runtime
whether or not it's possible to write a certain amount of data, or if it's
not possible, to be notified when it is.
| Method Summary | |
|---|---|
boolean |
canWrite(int length)
|
void |
notifyCanWrite(WriteHandler handler,
int length)
Instructs the NIOOutputSink to invoke the provided
WriteHandler when it is possible to write length
bytes. |
| Method Detail |
|---|
void 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.
handler - the WriteHandler that should be notified
when it's possible to write length bytes.length - the number of bytes that require writing.
java.lang.IllegalStateException - if this method is invoked and a handler
from a previous invocation is still present (due to not having yet been
notified).boolean canWrite(int length)
length - specifies the number of bytes that require writing
true if a write to this NIOOutputSink
will succeed, otherwise returns false.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||