Package net.didion.jwnl.princeton.file
Class AbstractPrincetonRandomAccessDictionaryFile
java.lang.Object
net.didion.jwnl.dictionary.file.AbstractDictionaryFile
net.didion.jwnl.princeton.file.AbstractPrincetonDictionaryFile
net.didion.jwnl.princeton.file.AbstractPrincetonRandomAccessDictionaryFile
- All Implemented Interfaces:
DictionaryFile,RandomAccessDictionaryFile
- Direct Known Subclasses:
PrincetonChannelDictionaryFile,PrincetonRandomAccessDictionaryFile
public abstract class AbstractPrincetonRandomAccessDictionaryFile
extends AbstractPrincetonDictionaryFile
implements RandomAccessDictionaryFile
-
Field Summary
Fields inherited from interface net.didion.jwnl.dictionary.file.DictionaryFile
COMMENT_HEADER -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPrincetonRandomAccessDictionaryFile(String path, POS pos, DictionaryFileType fileType) -
Method Summary
Modifier and TypeMethodDescriptionlongGet the byte offset of the next line (after the position of the file pointer)booleanisPreviousLineOffset(long offset) Return true ifoffsetis the previous offset.voidsetNextLineOffset(long previousOffset, long nextOffset) Move the file pointer so that its next line offset is nextOffsetMethods inherited from class net.didion.jwnl.princeton.file.AbstractPrincetonDictionaryFile
makeFilenameMethods inherited from class net.didion.jwnl.dictionary.file.AbstractDictionaryFile
getFile, getFileType, getPOS, open, openFileMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.didion.jwnl.dictionary.file.DictionaryFile
close, getFile, getFileType, getPOS, isOpen, newInstance, openMethods inherited from interface net.didion.jwnl.dictionary.file.RandomAccessDictionaryFile
getFilePointer, length, read, readLine, seek
-
Constructor Details
-
AbstractPrincetonRandomAccessDictionaryFile
public AbstractPrincetonRandomAccessDictionaryFile() -
AbstractPrincetonRandomAccessDictionaryFile
protected AbstractPrincetonRandomAccessDictionaryFile(String path, POS pos, DictionaryFileType fileType)
-
-
Method Details
-
setNextLineOffset
public void setNextLineOffset(long previousOffset, long nextOffset) Description copied from interface:RandomAccessDictionaryFileMove the file pointer so that its next line offset is nextOffset- Specified by:
setNextLineOffsetin interfaceRandomAccessDictionaryFile
-
isPreviousLineOffset
public boolean isPreviousLineOffset(long offset) Description copied from interface:RandomAccessDictionaryFileReturn true ifoffsetis the previous offset.- Specified by:
isPreviousLineOffsetin interfaceRandomAccessDictionaryFile
-
getNextLineOffset
public long getNextLineOffset()Description copied from interface:RandomAccessDictionaryFileGet the byte offset of the next line (after the position of the file pointer)- Specified by:
getNextLineOffsetin interfaceRandomAccessDictionaryFile
-