public abstract class AbstractPrincetonRandomAccessDictionaryFile extends AbstractPrincetonDictionaryFile implements RandomAccessDictionaryFile
| Modifier and Type | Field and Description |
|---|---|
private long |
_nextOffset
Used for caching the offset of the line following the line at
previousOffset. |
private long |
_previousOffset
Used for caching the previously accessed file offset.
|
COMMENT_HEADER| Modifier | Constructor and Description |
|---|---|
|
AbstractPrincetonRandomAccessDictionaryFile() |
protected |
AbstractPrincetonRandomAccessDictionaryFile(java.lang.String path,
POS pos,
DictionaryFileType fileType) |
| Modifier and Type | Method and Description |
|---|---|
long |
getNextLineOffset()
Get the byte offset of the next line (after the position of the file pointer)
|
boolean |
isPreviousLineOffset(long offset)
Return true if
offset is the previous offset. |
void |
setNextLineOffset(long previousOffset,
long nextOffset)
Move the file pointer so that its next line offset is nextOffset
|
makeFilenamegetFile, getFileType, getPOS, open, openFileclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFilePointer, length, read, readLine, seekclose, getFile, getFileType, getPOS, isOpen, newInstance, openprivate long _previousOffset
private long _nextOffset
previousOffset.public AbstractPrincetonRandomAccessDictionaryFile()
protected AbstractPrincetonRandomAccessDictionaryFile(java.lang.String path,
POS pos,
DictionaryFileType fileType)
public void setNextLineOffset(long previousOffset,
long nextOffset)
RandomAccessDictionaryFilesetNextLineOffset in interface RandomAccessDictionaryFilepublic boolean isPreviousLineOffset(long offset)
RandomAccessDictionaryFileoffset is the previous offset.isPreviousLineOffset in interface RandomAccessDictionaryFilepublic long getNextLineOffset()
RandomAccessDictionaryFilegetNextLineOffset in interface RandomAccessDictionaryFile