fiftyone.mobile.detection.entities.stream
Class TrieSource
java.lang.Object
fiftyone.mobile.detection.entities.stream.TrieSource
- All Implemented Interfaces:
- Disposable
public class TrieSource
- extends Object
- implements Disposable
Encapsulates either a byte array or a file containing the uncompressed data
structures used by the data set.
Must be disposed to ensure that the
readers are closed and the file free for other uses. Does not need to be
disposed if a byte array is used.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fileInputStream
private final FileInputStream fileInputStream
TrieSource
public TrieSource(String filename)
throws FileNotFoundException
- Throws:
FileNotFoundException
dispose
public void dispose()
- Specified by:
dispose in interface Disposable
createReader
public TrieReader createReader()
throws IOException
- Creates a new reader and stores a reference to it.
- Returns:
- A reader open for read access to the stream
- Throws:
IOException