|
||||||||||
| 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,
Object... args)
Indicates if the processing loop can continue. |
boolean |
couldFill(Buffer buffer,
Object... args)
Indicates if the buffer could be filled again. |
int |
onDrain(Buffer buffer,
int maxDrained,
Object... args)
Drains the byte buffer. |
int |
onFill(Buffer buffer,
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,
Object... args)
Called back before a processing pass. |
| Method Detail |
|---|
boolean canLoop(Buffer buffer,
Object... args)
buffer - The IO buffer to drain.args - The optional arguments to pass back to the callbacks.
boolean couldFill(Buffer buffer,
Object... args)
buffer - The IO buffer to fill.args - The optional arguments to pass back to the callbacks.
int onDrain(Buffer buffer,
int maxDrained,
Object... args)
throws 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.
IOException
int onFill(Buffer buffer,
Object... args)
throws IOException
buffer - The IO buffer to drain.args - The optional arguments to pass back to the callbacks.
IOExceptionvoid onFillEof()
void postProcess(int drained)
throws IOException
drained - The number of bytes drained or -1 if the filling source has
ended.
IOException
int preProcess(int maxDrained,
Object... args)
throws 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.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||