public class ByteBufferRewinder extends Object implements DataRewinder<ByteBuffer>
ByteBuffers.| 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)
public ByteBuffer rewindAndGet() throws IOException
DataRewinderrewindAndGet in interface DataRewinder<ByteBuffer>IOExceptionpublic void cleanup()
DataRewinderThe underlying data may still be in use and should not be closed or invalidated.
cleanup in interface DataRewinder<ByteBuffer>