Interface RandomAccessDictionaryFile

All Superinterfaces:
DictionaryFile
All Known Implementing Classes:
AbstractPrincetonRandomAccessDictionaryFile, PrincetonChannelDictionaryFile, PrincetonRandomAccessDictionaryFile

public interface RandomAccessDictionaryFile extends DictionaryFile
DictionaryFile that reads lines from a random-access text file.
  • Method Details

    • read

      int read() throws IOException
      Read a byte from the file
      Throws:
      IOException
    • readLine

      String readLine() throws IOException
      Read a line from the file
      Throws:
      IOException
    • seek

      void seek(long pos) throws IOException
      Go to postion pos in the file.
      Throws:
      IOException
    • getFilePointer

      long getFilePointer() throws IOException
      Get the current position of the file pointer.
      Throws:
      IOException
    • length

      long length() throws IOException
      Get the length, in bytes, of the file
      Throws:
      IOException
    • setNextLineOffset

      void setNextLineOffset(long previousOffset, long nextOffset)
      Move the file pointer so that its next line offset is nextOffset
    • isPreviousLineOffset

      boolean isPreviousLineOffset(long offset)
      Return true if offset is the previous offset.
    • getNextLineOffset

      long getNextLineOffset()
      Get the byte offset of the next line (after the position of the file pointer)