|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FileManager
FileManager defines the interface between the FileBackedDictionary and the file system.
Methods in this interface operate on and return offsets, which are indices into a dictionary file.
| Method Summary | |
|---|---|
void |
close()
Shut down the file manager. |
long |
getFirstLinePointer(POS pos,
DictionaryFileType fileType)
Return the first valid line pointer in the specified file. |
long |
getIndexedLinePointer(POS pos,
DictionaryFileType fileType,
java.lang.String index)
Search for the line whose first word is index (that is, that begins with index followed by a space or tab). |
long |
getMatchingLinePointer(POS pos,
DictionaryFileType fileType,
long offset,
java.lang.String substring)
Search for a line whose index word contains substring, starting at offset. |
long |
getNextLinePointer(POS pos,
DictionaryFileType fileType,
long offset)
Search for the line following the line that begins at offset. |
long |
getRandomLinePointer(POS pos,
DictionaryFileType index)
Return a randomly-chosen line pointer (offset of the beginning of a line). |
java.lang.String |
readLineAt(POS pos,
DictionaryFileType fileType,
long offset)
Read the line that begins at file offset offset. |
| Methods inherited from interface net.didion.jwnl.util.factory.Createable |
|---|
create |
| Method Detail |
|---|
long getIndexedLinePointer(POS pos,
DictionaryFileType fileType,
java.lang.String index)
throws java.io.IOException,
java.rmi.RemoteException
-1 if no such line exists.
java.io.IOException
java.rmi.RemoteException
java.lang.String readLineAt(POS pos,
DictionaryFileType fileType,
long offset)
throws java.io.IOException,
java.rmi.RemoteException
java.io.IOException
java.rmi.RemoteException
long getNextLinePointer(POS pos,
DictionaryFileType fileType,
long offset)
throws java.io.IOException,
java.rmi.RemoteException
-1 if offset
is the last line in the file.
java.io.IOException
java.rmi.RemoteException
long getMatchingLinePointer(POS pos,
DictionaryFileType fileType,
long offset,
java.lang.String substring)
throws java.io.IOException,
java.rmi.RemoteException
-1 if
no such line exists.
java.io.IOException
java.rmi.RemoteException
long getRandomLinePointer(POS pos,
DictionaryFileType index)
throws java.io.IOException
pos - index -
java.io.IOException
long getFirstLinePointer(POS pos,
DictionaryFileType fileType)
throws java.io.IOException
pos - fileType -
java.io.IOExceptionvoid close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||