BinaryPerceptronModelReader (Apache OpenNLP Tools 2.5.9 API)
Description: declaration: package: opennlp.tools.ml.perceptron, class: BinaryPerceptronModelReader

# Class BinaryPerceptronModelReader

java.lang.Object
opennlp.tools.ml.model.AbstractModelReader
opennlp.tools.ml.perceptron.PerceptronModelReader
opennlp.tools.ml.perceptron.BinaryPerceptronModelReader

public class BinaryPerceptronModelReader extends PerceptronModelReader
A `PerceptronModelReader` that reads models from a binary format.

- ## Field Summary

  ### Fields inherited from class AbstractModelReader

  `MAX_ENTRIES_PROPERTY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BinaryPerceptronModelReader(DataInputStream dis)`
  Instantiates `BinaryPerceptronModelReader` via a `DataInputStream` containing the model contents.
  `BinaryPerceptronModelReader(File f)`
  Instantiates `BinaryPerceptronModelReader` via a `File` and creates a reader for it.

- ## Method Summary

  ### Methods inherited from class PerceptronModelReader

  `checkModelType, constructModel`

  ### Methods inherited from class AbstractModelReader

  `getModel, readDouble, readInt, readUTF`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### BinaryPerceptronModelReader

    public BinaryPerceptronModelReader(DataInputStream dis)
    Instantiates `BinaryPerceptronModelReader` via a `DataInputStream` containing the model contents.
    Parameters:
      `dis` - The `DataInputStream` containing the model information. It must be open and have bytes available.

  - ### BinaryPerceptronModelReader

    public BinaryPerceptronModelReader(File f) throws IOException
    Instantiates `BinaryPerceptronModelReader` via a `File` and creates a reader for it. Based on whether the file's suffix contains `.gz`, it detects whether the file is gzipped or not.
    Parameters:
      `f` - The `File` that references the model to be read.
    Throws:
      `IOException`