- All Known Implementing Classes:
BufferedIndexInput,BufferedIndexInput.SlicedIndexInput,ByteBufferIndexInput,ByteBufferIndexInput.MultiBufferImpl,ByteBufferIndexInput.SingleBufferImpl,ByteBuffersDataInput,ByteBuffersIndexInput,EndiannessReverserIndexInput.EndiannessReverserRandomAccessInput,NIOFSDirectory.NIOFSIndexInput,RAFDirectory.RAFIndexInput
public interface RandomAccessInput
Random Access Index API. Unlike
IndexInput, 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
Modifier and TypeMethodDescriptionlonglength()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 Details
-
length
long length()The number of bytes in the file. -
readByte
Reads a byte at the given position in the file- Throws:
IOException- See Also:
-
readShort
Reads a short (LE byte order) at the given position in the file- Throws:
IOException- See Also:
-
readInt
Reads an integer (LE byte order) at the given position in the file- Throws:
IOException- See Also:
-
readLong
Reads a long (LE byte order) at the given position in the file- Throws:
IOException- See Also:
-