public final class DataFileChannel extends Object implements DataBuffer
FileChannel.| Constructor and Description |
|---|
DataFileChannel(FileChannel fileChannel,
long offset,
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 DataFileChannel(FileChannel fileChannel, long offset, long length)
fileChannel - The FileChannel representing the dataoffset - The offset into the FileChannellength - The length of the data to readpublic 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.