public final class DataByteBuffer extends Object implements DataBuffer
ByteBuffer.| Constructor and Description |
|---|
DataByteBuffer(ByteBuffer buffer,
long length) |
| Modifier and Type | Method and Description |
|---|---|
long |
getLength()
Returns the length of the data.
|
Object |
getNettyOutput()
Returns an object for writing to a netty channel.
|
ByteBuffer |
getReadOnlyByteBuffer()
Returns a
ByteBuffer for read-only access to the data. |
void |
release()
Release the underlying buffer of this DataBuffer if no longer needed.
|
public DataByteBuffer(ByteBuffer buffer, long length)
buffer - The ByteBuffer representing the datalength - The length of the ByteBufferpublic Object getNettyOutput()
DataBuffergetNettyOutput in interface DataBufferpublic long getLength()
DataBuffergetLength in interface DataBufferpublic ByteBuffer getReadOnlyByteBuffer()
DataBufferByteBuffer for read-only access to the data.getReadOnlyByteBuffer in interface DataBufferpublic void release()
DataBufferrelease in interface DataBufferCopyright © 2015. All Rights Reserved.