public interface ByteProcessable
byte
s - typically some sort of
buffer. processing
of the data without any dependency or knowledge of the
internals of this data-provider. ByteProcessor
(e.g. as anonymous or inner class) with its custom logic.
He is entirely independent from the underlying implementation of this interface that may use one big byte-array to
store the provided data or have it sliced into multiple smaller byte-arrays.Modifier and Type | Method and Description |
---|---|
long |
process(ByteProcessor processor,
long length)
This method processes the number of bytes given by
length (as far as available) using the given
processor . |
long process(ByteProcessor processor, long length)
length
(as far as available) using the given
processor
.processor
- is the ByteProcessor
called to process the bytes. It may be called multiple types if the
data is sliced into multiple byte-arrays.length
- is the desired number of bytes to process. The value has to be greater or equal to 0
. A value
of 0
will have no effect. If you want to process all available data to the end of stream or buffer
you may use Long.MAX_VALUE
.length
this will typically
be equal to length
. However if the end of the data has been reached, a smaller value is returned.
The value will always be greater or equal to 0
.Copyright © 2001–2016 mmm-Team. All rights reserved.