public interface BufferProcessor
Modifier and Type | Method and Description |
---|---|
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.
|
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.IOException
void 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
Copyright © 2005–2015. All rights reserved.