JavaScript is disabled on your browser.
All Superinterfaces:
Createable
, Remote
All Known Implementing Classes:
FileManagerImpl
, RemoteFileManager
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
All Methods Instance Methods Abstract Methods
void
Shut down the file manager.
long
Return the first valid line pointer in the specified file.
long
Search for the line whose first word is index (that is, that begins with
index followed by a space or tab).
long
Search for a line whose index word contains substring , starting at offset .
long
Search for the line following the line that begins at offset .
long
Return a randomly-chosen line pointer (offset of the beginning of a line).
Read the line that begins at file offset offset .
Method Details
getIndexedLinePointer
Search for the line whose first word is index (that is, that begins with
index followed by a space or tab).
Returns:
The file offset of the start of the matching line, or -1
if no such line exists.
Throws:
IOException
RemoteException
getNextLinePointer
Search for the line following the line that begins at offset .
Returns:
The file offset of the start of the line, or -1
if offset
is the last line in the file.
Throws:
IOException
RemoteException
getMatchingLinePointer
Search for a line whose index word contains substring , starting at offset .
Returns:
The file offset of the start of the matchng line, or -1
if
no such line exists.
Throws:
IOException
RemoteException
getRandomLinePointer
Return a randomly-chosen line pointer (offset of the beginning of a line).
Parameters:
pos
-
index
-
Returns:
Throws:
IOException
getFirstLinePointer
Return the first valid line pointer in the specified file.
Parameters:
pos
-
fileType
-
Returns:
Throws:
IOException
close
void close ()
Shut down the file manager.