Package org.apache.lucene.store
Interface RandomAccessInput
-
- All Known Implementing Classes:
BufferedIndexInput,ByteBufferIndexInput,ByteBuffersDataInput,ByteBuffersIndexInput
public interface RandomAccessInputRandom Access Index API. UnlikeIndexInput, this has no concept of file position, all reads are absolute. However, like IndexInput, it is only intended for use by a single thread.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longlength()The number of bytes in the file.bytereadByte(long pos)Reads a byte at the given position in the fileintreadInt(long pos)Reads an integer (LE byte order) at the given position in the filelongreadLong(long pos)Reads a long (LE byte order) at the given position in the fileshortreadShort(long pos)Reads a short (LE byte order) at the given position in the file
-
-
-
Method Detail
-
length
long length()
The number of bytes in the file.
-
readByte
byte readByte(long pos) throws IOExceptionReads a byte at the given position in the file- Throws:
IOException- See Also:
DataInput.readByte()
-
readShort
short readShort(long pos) throws IOExceptionReads a short (LE byte order) at the given position in the file- Throws:
IOException- See Also:
DataInput.readShort(),BitUtil.VH_LE_SHORT
-
readInt
int readInt(long pos) throws IOExceptionReads an integer (LE byte order) at the given position in the file- Throws:
IOException- See Also:
DataInput.readInt(),BitUtil.VH_LE_INT
-
readLong
long readLong(long pos) throws IOExceptionReads a long (LE byte order) at the given position in the file- Throws:
IOException- See Also:
DataInput.readLong(),BitUtil.VH_LE_LONG
-
-