Package org.terrier.utility.io
Interface RandomDataInput
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable,java.io.DataInput
- All Known Subinterfaces:
RandomDataOutput
- All Known Implementing Classes:
LocalFileSystem.LocalRandomAccessFile,RandomDataInputMemory
public interface RandomDataInput extends java.io.DataInput, java.io.CloseableThis interface represents an interface on a RandomAccessFile.- Since:
- 2.2
- Author:
- Craig Macdonald
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description longgetFilePointer()Return the current position in the filelonglength()Returns the length of the filedefault voidreadFullyDirect(byte[] dst, long offset, int length)voidseek(long pos)Seek to specified position in the file
-
-
-
Method Detail
-
getFilePointer
long getFilePointer() throws java.io.IOExceptionReturn the current position in the file- Throws:
java.io.IOException
-
seek
void seek(long pos) throws java.io.IOException
Seek to specified position in the file- Throws:
java.io.IOException
-
length
long length() throws java.io.IOExceptionReturns the length of the file- Throws:
java.io.IOException
-
readFullyDirect
default void readFullyDirect(byte[] dst, long offset, int length) throws java.io.IOException- Throws:
java.io.IOException
-
-