public class MultiByteBufferInput extends BlockInput
Constructor and Description |
---|
MultiByteBufferInput(ByteBuffer[] bufs)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected 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, skip
public MultiByteBufferInput(ByteBuffer[] bufs)
bufs
- byte buffers holding datapublic int[] getBlockPos(long offset)
BlockInput
This does the opposite of getBlockOffset
.
getBlockPos
in class BlockInput
offset
- offset into this input streampublic long getBlockOffset(int iblock, int offsetInBlock)
BlockInput
This does the opposite of getBlockPos
.
getBlockOffset
in class BlockInput
iblock
- block indexoffsetInBlock
- offset into that blockprotected ByteBuffer acquireBlock(int iblock)
BlockInput
acquireBlock
in class BlockInput
iblock
- block indexpublic void close()
BasicInput
close
in interface BasicInput
close
in class BlockInput
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.