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
A `DataReader` implementation based on `ObjectInputStream`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ObjectDataReader(ObjectInputStream ois)`
  Instantiates an `ObjectDataReader`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double`
  `readDouble()`
  `int`
  `readInt()`
  `String`
  `readUTF()`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ObjectDataReader

    public ObjectDataReader(ObjectInputStream ois)
    Instantiates an `ObjectDataReader`.
    Parameters:
      `ois` - The open `ObjectInputStream` to use.

- ## Method Details

  - ### readDouble

    public double readDouble() throws IOException
    Specified by:
      `readDouble` in interface `DataReader`
    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 interface `DataReader`
    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 interface `DataReader`
    Returns:
      Reads and returns `UTF-encoded characters`.
    Throws:
      `IOException` - Thrown if IO errors occurred during read operation.