AbstractModelWriter (Apache OpenNLP Tools 1.9.5 API)
Date: 2026-06-18

opennlp.tools.ml.model

## Class AbstractModelWriter

- java.lang.Object
- - opennlp.tools.ml.model.AbstractModelWriter

- Direct Known Subclasses:
    GenericModelWriter, GISModelWriter, NaiveBayesModelWriter, PerceptronModelWriter

      public abstract class AbstractModelWriter
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractModelWriter()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `close()`
    `abstract void` | `persist()`
    `abstract void` | `writeDouble(double d)`
    `abstract void` | `writeInt(int i)`
    `abstract void` | `writeUTF(String s)`

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

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

- - ### Constructor Detail

    - #### AbstractModelWriter

          public AbstractModelWriter()

  - ### Method Detail

    - #### writeUTF

          public abstract void writeUTF(String s)
                                 throws IOException

      Throws:
        `IOException`

    - #### writeInt

          public abstract void writeInt(int i)
                                 throws IOException

      Throws:
        `IOException`

    - #### writeDouble

          public abstract void writeDouble(double d)
                                    throws IOException

      Throws:
        `IOException`

    - #### close

          public abstract void close()
                              throws IOException

      Throws:
        `IOException`

    - #### persist

          public abstract void persist()
                                throws IOException

      Throws:
        `IOException`

Copyright © 2026 The Apache Software Foundation. All rights reserved.