Package opennlp.tools.ml.model
Class AbstractModelWriter
java.lang.Object
opennlp.tools.ml.model.AbstractModelWriter
- Direct Known Subclasses:
- AbstractMLModelWriter,- GenericModelWriter
An abstract, basic implementation of a model writer.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract voidclose()Closes the underlyingDataOutputStream.abstract voidpersist()Serializes themodelusing thewriteUTF(String),writeDouble(double), orwriteInt(int)} methods implemented by extending classes.abstract voidwriteDouble(double d) Writes a singledoubleto the underlyingDataOutputStream.abstract voidwriteInt(int i) Writes a singleintto the underlyingDataOutputStream.abstract voidWrites aStringto the underlyingDataOutputStream.
- 
Constructor Details- 
AbstractModelWriterpublic AbstractModelWriter()
 
- 
- 
Method Details- 
writeUTFWrites aStringto the underlyingDataOutputStream.- Parameters:
- s- The- UTF encodedcharacters.
- Throws:
- IOException- Thrown if IO errors occurred.
 
- 
writeIntWrites a singleintto the underlyingDataOutputStream.- Parameters:
- i- The- intvalue.
- Throws:
- IOException- Thrown if IO errors occurred.
 
- 
writeDoubleWrites a singledoubleto the underlyingDataOutputStream.- Parameters:
- d- The- doublevalue.
- Throws:
- IOException- Thrown if IO errors occurred.
 
- 
closeCloses the underlyingDataOutputStream.- Throws:
- IOException- Thrown if IO errors occurred.
 
- 
persistSerializes themodelusing thewriteUTF(String),writeDouble(double), orwriteInt(int)} methods implemented by extending classes.- Throws:
- IOException- Thrown if IO errors occurred.
 
 
-