|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RandomAccessDictionaryFile
DictionaryFile
that reads lines from a random-access text file.
Method Summary | |
---|---|
long |
getFilePointer()
Returns the current position of the file pointer. |
long |
getNextLineOffset()
Returns the byte offset of the next line (after the position of the file pointer). |
String |
getOffsetFormatString()
Returns offset format string that accommodates largest offset. |
boolean |
isPreviousLineOffset(long offset)
Returns true if offset is the previous offset. |
long |
length()
Returns the length, in bytes, of the file. |
int |
read()
Reads a byte from the file. |
String |
readLine()
Reads a line from the file. |
String |
readLineWord()
Reads the first word from a file (ie offset, index word). |
void |
seek(long pos)
Goes to position pos in the file. |
void |
setNextLineOffset(long previousOffset,
long nextOffset)
Moves the file pointer so that its next line offset is nextOffset. |
void |
writeLine(String line)
Writes a line to the file. |
void |
writeStrings(Collection<String> strings)
Writes strings in file. |
Methods inherited from interface net.sf.extjwnl.dictionary.file.DictionaryFile |
---|
close, delete, edit, getFile, getFileType, getPOS, isOpen, open, save |
Methods inherited from interface net.sf.extjwnl.util.factory.Owned |
---|
getDictionary, setDictionary |
Method Detail |
---|
int read() throws IOException
IOException
- IOExceptionString readLine() throws IOException
IOException
- IOExceptionvoid writeLine(String line) throws IOException
line
- a line to write
IOException
- IOExceptionString readLineWord() throws IOException
IOException
- IOExceptionvoid seek(long pos) throws IOException
pos
- position pos in the file
IOException
- IOExceptionlong getFilePointer() throws IOException
IOException
- IOExceptionlong length() throws IOException
IOException
- IOExceptionvoid setNextLineOffset(long previousOffset, long nextOffset)
previousOffset
- previous offsetnextOffset
- next offsetboolean isPreviousLineOffset(long offset)
offset
- previous offset
long getNextLineOffset()
void writeStrings(Collection<String> strings) throws IOException
strings
- strings to write
IOException
- IOExceptionString getOffsetFormatString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |