public class MultiByteBufferInput extends BlockInput
| Constructor and Description |
|---|
MultiByteBufferInput(java.nio.ByteBuffer[] bufs)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.nio.ByteBuffer |
acquireBlock(int iblock)
Obtains a buffer corresponding to a named block of the stream.
|
void |
close()
Releases resources belonging to this object.
|
long |
getBlockOffset(int iblock,
int offsetInBlock)
Returns the offset into this stream corresponding to a given
block index and offset into that block.
|
int[] |
getBlockPos(long offset)
Returns the block location of a given byte offset.
|
getBlockCount, getOffset, isRandom, readByte, readBytes, readDouble, readFloat, readInt, readLong, readShort, seek, skippublic MultiByteBufferInput(java.nio.ByteBuffer[] bufs)
bufs - byte buffers holding datapublic int[] getBlockPos(long offset)
BlockInputThis does the opposite of getBlockOffset.
getBlockPos in class BlockInputoffset - offset into this input streampublic long getBlockOffset(int iblock,
int offsetInBlock)
BlockInputThis does the opposite of getBlockPos.
getBlockOffset in class BlockInputiblock - block indexoffsetInBlock - offset into that blockprotected java.nio.ByteBuffer acquireBlock(int iblock)
BlockInputacquireBlock in class BlockInputiblock - block indexpublic void close()
BasicInputclose in interface BasicInputclose in class BlockInput