public interface RandomAccessDictionaryFile extends DictionaryFile
DictionaryFile that reads lines from a random-access text file.| Modifier and Type | Method and Description |
|---|---|
long |
getFirstLineOffset()
Returns offset of the first line.
|
long |
getNextLineOffset(long offset)
Returns start of the next line or -1 if no new line.
|
int |
getOffsetLength()
Returns offset length that accommodates largest offset.
|
long |
length()
Returns the length, in bytes, of the file.
|
PointedCharSequence |
readLine(long offset)
Reads starting at offset and till the end of line.
|
PointedCharSequence |
readWord(long offset)
Reads starting at offset and till space.
|
void |
setOffsetLength(int length)
Sets offset length to be used while rendering the file.
|
close, edit, getFilename, getFileType, getPOS, isOpen, open, savegetDictionary, setDictionaryPointedCharSequence readLine(long offset) throws JWNLException
offset - offsetJWNLException - JWNLExceptionPointedCharSequence readWord(long offset) throws JWNLException
offset - offsetJWNLException - JWNLExceptionlong getFirstLineOffset()
throws JWNLException
JWNLException - JWNLExceptionlong getNextLineOffset(long offset)
throws JWNLException
offset - starting offsetJWNLException - JWNLExceptionlong length()
throws JWNLException
JWNLException - JWNLExceptionint getOffsetLength()
throws JWNLException
JWNLException - JWNLExceptionvoid setOffsetLength(int length)
throws JWNLException
length - offset length to be used while rendering the fileJWNLException - JWNLException