Package opennlp.tools.ml.model
Class BinaryFileDataReader
java.lang.Object
opennlp.tools.ml.model.BinaryFileDataReader
- All Implemented Interfaces:
- DataReader
A 
DataReader that reads files from a binary format.- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
BinaryFileDataReaderInstantiatesBinaryFileDataReadervia aFileand creates aDataInputStreamfor it. Based on whether the file's suffix contains.gz, it detects whether the file is gzipped or not.- Parameters:
- f- The- Filethat references the model to be read.
- Throws:
- IOException
 
- 
BinaryFileDataReader- Parameters:
- in- The- InputStreamthat references the model to be read.
 
- 
BinaryFileDataReaderInstantiatesBinaryFileDataReadervia anDataInputStream.- Parameters:
- in- The- DataInputStreamthat references the model to be read.
 
 
- 
- 
Method Details- 
readDouble- Specified by:
- readDoublein interface- DataReader
- Returns:
- Reads and returns a doublevalue.
- Throws:
- IOException- Thrown if IO errors occurred during read operation.
 
- 
readInt- Specified by:
- readIntin interface- DataReader
- Returns:
- Reads and returns an intvalue.
- Throws:
- IOException- Thrown if IO errors occurred during read operation.
 
- 
readUTF- Specified by:
- readUTFin interface- DataReader
- Returns:
- Reads and returns UTF-encoded characters.
- Throws:
- IOException- Thrown if IO errors occurred during read operation.
 
 
-