Module io.netty5.buffer
Package io.netty5.buffer.api
Interface ReadableComponentProcessor<E extends Exception>
-
- All Known Implementing Classes:
IovArray
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ReadableComponentProcessor<E extends Exception>
A processor of readable components.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
process(int index, ReadableComponent component)
Process the given component at the given index in theiteration
.
-
-
-
Method Detail
-
process
boolean process(int index, ReadableComponent component) throws E extends Exception
Process the given component at the given index in theiteration
.The component object itself is only valid during this call, but the
byte buffers
, arrays, and native address pointers obtained from it, will be valid until any operation is performed on the buffer, which changes the internal memory.- Parameters:
index
- The current index of the given buffer component, based on the initial index passed to theBuffer.forEachReadable(int, ReadableComponentProcessor)
method.component
- The current buffer component being processed.- Returns:
true
if the iteration should continue and more components should be processed, otherwisefalse
to stop the iteration early.- Throws:
E extends Exception
-
-