org.terrier.utility.io
Interface RandomDataInput

All Superinterfaces:
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.Closeable

This interface represents an interface on a RandomAccessFile.

Since:
2.2
Author:
Craig Macdonald

Method Summary
 long getFilePointer()
          Return the current position in the file
 long length()
          Returns the length of the file
 void seek(long pos)
          Seek to specified position in the file
 
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

getFilePointer

long getFilePointer()
                    throws java.io.IOException
Return 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.IOException
Returns the length of the file

Throws:
java.io.IOException


Terrier 3.5. Copyright © 2004-2011 University of Glasgow