|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BufferProcessor
Interface called back when IO buffer draining or filling can actually be done.
Method Summary | |
---|---|
boolean |
canLoop(Buffer buffer,
java.lang.Object... args)
Indicates if the processing loop can continue. |
boolean |
couldFill(Buffer buffer,
java.lang.Object... args)
Indicates if the buffer could be filled again. |
int |
onDrain(Buffer buffer,
int maxDrained,
java.lang.Object... args)
Drains the byte buffer. |
int |
onFill(Buffer buffer,
java.lang.Object... args)
Fills the byte buffer. |
void |
onFillEof()
Called back when a fill operation returns with an EOF status. |
void |
postProcess(int drained)
Called back after a complete processing pass. |
int |
preProcess(int maxDrained,
java.lang.Object... args)
Called back before a processing pass. |
Method Detail |
---|
boolean canLoop(Buffer buffer, java.lang.Object... args)
buffer
- The IO buffer to drain.args
- The optional arguments to pass back to the callbacks.
boolean couldFill(Buffer buffer, java.lang.Object... args)
buffer
- The IO buffer to fill.args
- The optional arguments to pass back to the callbacks.
int onDrain(Buffer buffer, int maxDrained, java.lang.Object... args) throws java.io.IOException
buffer
- The IO buffer to drain.maxDrained
- The maximum number of bytes drained by this call.args
- The optional arguments to pass back to the callbacks.
java.io.IOException
int onFill(Buffer buffer, java.lang.Object... args) throws java.io.IOException
buffer
- The IO buffer to drain.args
- The optional arguments to pass back to the callbacks.
java.io.IOException
void onFillEof()
void postProcess(int drained) throws java.io.IOException
drained
- The number of bytes drained or -1 if the filling source has
ended.
java.io.IOException
int preProcess(int maxDrained, java.lang.Object... args) throws java.io.IOException
maxDrained
- The maximum number of bytes drained by this call or 0 for
unlimited length.args
- The optional arguments to pass back to the callbacks.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |