public class ByteBufferRewinder extends java.lang.Object implements DataRewinder<java.nio.ByteBuffer>
ByteBuffer
s.Modifier and Type | Class and Description |
---|---|
static class |
ByteBufferRewinder.Factory
Factory for
ByteBufferRewinder . |
Constructor and Description |
---|
ByteBufferRewinder(java.nio.ByteBuffer buffer) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Called when this rewinder is no longer needed and can be cleaned up.
|
java.nio.ByteBuffer |
rewindAndGet()
Rewinds the wrapped data back to the beginning and returns the re-wound data (or a wrapper for
the re-wound data).
|
@NonNull public java.nio.ByteBuffer rewindAndGet()
DataRewinder
rewindAndGet
in interface DataRewinder<java.nio.ByteBuffer>
public void cleanup()
DataRewinder
The underlying data may still be in use and should not be closed or invalidated.
cleanup
in interface DataRewinder<java.nio.ByteBuffer>