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
ConstructorDescriptionInitializes aPlainTextFileDataReader
via aBufferedReader
.Initializes aPlainTextFileDataReader
via aFile
.Initializes aPlainTextFileDataReader
via aInputStream
. -
Method Summary
-
Constructor Details
-
PlainTextFileDataReader
Initializes aPlainTextFileDataReader
via aFile
.- Parameters:
f
- TheFile
that references the model to be read.- Throws:
IOException
- Thrown if IO errors occurred.
-
PlainTextFileDataReader
Initializes aPlainTextFileDataReader
via aInputStream
.- Parameters:
in
- TheInputStream
that references the file to be read.
-
PlainTextFileDataReader
Initializes aPlainTextFileDataReader
via aBufferedReader
.- Parameters:
in
- TheBufferedReader
that references the file to be read.
-
-
Method Details
-
readDouble
- Specified by:
readDouble
in interfaceDataReader
- Returns:
- Reads and returns a
double
value. - Throws:
IOException
- Thrown if IO errors occurred during read operation.
-
readInt
- Specified by:
readInt
in interfaceDataReader
- Returns:
- Reads and returns an
int
value. - Throws:
IOException
- Thrown if IO errors occurred during read operation.
-
readUTF
- Specified by:
readUTF
in interfaceDataReader
- Returns:
- Reads and returns
UTF-encoded characters
. - Throws:
IOException
- Thrown if IO errors occurred during read operation.
-