static final class ByteBufferIndexInput.SingleBufferImpl extends ByteBufferIndexInput
ByteBufferIndexInput.MultiBufferImpl, ByteBufferIndexInput.SingleBufferImpl
buffers, chunkSizeMask, chunkSizePower, curBuf, curBufIndex, guard, isClone, length
Constructor and Description |
---|
SingleBufferImpl(java.lang.String resourceDescription,
java.nio.ByteBuffer buffer,
long length,
int chunkSizePower,
ByteBufferGuard guard) |
Modifier and Type | Method and Description |
---|---|
long |
getFilePointer()
Returns the current position in this file, where the next read will
occur.
|
byte |
readByte(long pos)
Reads a byte at the given position in the file
|
int |
readInt(long pos)
Reads an integer at the given position in the file
|
long |
readLong(long pos)
Reads a long at the given position in the file
|
short |
readShort(long pos)
Reads a short at the given position in the file
|
void |
seek(long pos)
Sets current position in this file, where the next read will occur.
|
buildSlice, clone, close, length, newCloneInstance, newInstance, readByte, readBytes, readInt, readLong, readShort, slice
getFullSliceDescription, randomAccessSlice, toString
readBytes, readMapOfStrings, readSetOfStrings, readString, readVInt, readVLong, readZInt, readZLong, skipBytes
SingleBufferImpl(java.lang.String resourceDescription, java.nio.ByteBuffer buffer, long length, int chunkSizePower, ByteBufferGuard guard)
public void seek(long pos) throws java.io.IOException
IndexInput
EOFException
and then the
stream is in an undetermined state.seek
in class ByteBufferIndexInput
java.io.IOException
IndexInput.getFilePointer()
public long getFilePointer()
IndexInput
getFilePointer
in class ByteBufferIndexInput
IndexInput.seek(long)
public byte readByte(long pos) throws java.io.IOException
RandomAccessInput
readByte
in interface RandomAccessInput
readByte
in class ByteBufferIndexInput
java.io.IOException
DataInput.readByte()
public short readShort(long pos) throws java.io.IOException
RandomAccessInput
readShort
in interface RandomAccessInput
readShort
in class ByteBufferIndexInput
java.io.IOException
DataInput.readShort()
public int readInt(long pos) throws java.io.IOException
RandomAccessInput
readInt
in interface RandomAccessInput
readInt
in class ByteBufferIndexInput
java.io.IOException
DataInput.readInt()
public long readLong(long pos) throws java.io.IOException
RandomAccessInput
readLong
in interface RandomAccessInput
readLong
in class ByteBufferIndexInput
java.io.IOException
DataInput.readLong()