Package opennlp.tools.ml.model
Class PlainTextFileDataReader
java.lang.Object
opennlp.tools.ml.model.PlainTextFileDataReader
- All Implemented Interfaces:
DataReader
A generic
DataReader implementation for plain text files.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes aPlainTextFileDataReadervia aBufferedReader.Initializes aPlainTextFileDataReadervia aFile.Initializes aPlainTextFileDataReadervia aInputStream. -
Method Summary
-
Constructor Details
-
PlainTextFileDataReader
Initializes aPlainTextFileDataReadervia aFile.- Parameters:
f- TheFilethat references the model to be read.- Throws:
IOException- Thrown if IO errors occurred.
-
PlainTextFileDataReader
Initializes aPlainTextFileDataReadervia aInputStream.- Parameters:
in- TheInputStreamthat references the file to be read.
-
PlainTextFileDataReader
Initializes aPlainTextFileDataReadervia aBufferedReader.- Parameters:
in- TheBufferedReaderthat references the file to be read.
-
-
Method Details
-
readDouble
- Specified by:
readDoublein interfaceDataReader- Returns:
- Reads and returns a
doublevalue. - Throws:
IOException- Thrown if IO errors occurred during read operation.
-
readInt
- Specified by:
readIntin interfaceDataReader- Returns:
- Reads and returns an
intvalue. - Throws:
IOException- Thrown if IO errors occurred during read operation.
-
readUTF
- Specified by:
readUTFin interfaceDataReader- Returns:
- Reads and returns
UTF-encoded characters. - Throws:
IOException- Thrown if IO errors occurred during read operation.
-