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