Package opennlp.tools.ml.model
Class ObjectDataReader
- java.lang.Object
-
- opennlp.tools.ml.model.ObjectDataReader
-
- All Implemented Interfaces:
DataReader
public class ObjectDataReader extends Object implements DataReader
ADataReader
implementation based onObjectInputStream
.
-
-
Constructor Summary
Constructors Constructor Description ObjectDataReader(ObjectInputStream ois)
Instantiates anObjectDataReader
.
-
-
-
Constructor Detail
-
ObjectDataReader
public ObjectDataReader(ObjectInputStream ois)
Instantiates anObjectDataReader
.- Parameters:
ois
- The openObjectInputStream
to use.
-
-
Method Detail
-
readDouble
public double readDouble() throws IOException
- Specified by:
readDouble
in interfaceDataReader
- Returns:
- Reads and returns a
double
value. - Throws:
IOException
- Thrown if IO errors occurred during read operation.
-
readInt
public int readInt() throws IOException
- Specified by:
readInt
in interfaceDataReader
- Returns:
- Reads and returns an
int
value. - Throws:
IOException
- Thrown if IO errors occurred during read operation.
-
readUTF
public String readUTF() throws IOException
- Specified by:
readUTF
in interfaceDataReader
- Returns:
- Reads and returns
UTF-encoded characters
. - Throws:
IOException
- Thrown if IO errors occurred during read operation.
-
-