Package opennlp.tools.ml.maxent.io
Class BinaryQNModelWriter
java.lang.Object
opennlp.tools.ml.model.AbstractModelWriter
opennlp.tools.ml.AbstractMLModelWriter
opennlp.tools.ml.maxent.io.GISModelWriter
opennlp.tools.ml.maxent.io.QNModelWriter
opennlp.tools.ml.maxent.io.BinaryQNModelWriter
A 
QNModelWriter that writes models in a binary format.- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionBinaryQNModelWriter(AbstractModel model, DataOutputStream dos) BinaryQNModelWriter(AbstractModel model, File f) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Closes the underlyingDataOutputStream.voidwriteDouble(double d) Writes a singledoubleto the underlyingDataOutputStream.voidwriteInt(int i) Writes a singleintto the underlyingDataOutputStream.voidWrites aStringto the underlyingDataOutputStream.Methods inherited from class opennlp.tools.ml.maxent.io.QNModelWriterpersist
- 
Constructor Details- 
BinaryQNModelWriterInstantiatesBinaryQNModelWritervia anQN modeland aFile.Prepares writing of a modelto the file. Based on whether the file's suffix contains.gz, it detects whether the file is gzipped or not.- Parameters:
- model- The- QN modelwhich is to be persisted.
- f- The- Filein which the model is to be persisted.
- Throws:
- IOException- Thrown if IO errors occurred.
- See Also:
 
- 
BinaryQNModelWriter- Parameters:
- model- The- QN modelwhich is to be persisted.
- dos- The- DataOutputStreamwhich is used to persist the- model. The- dosmust be opened.
- See Also:
 
 
- 
- 
Method Details- 
writeUTFWrites aStringto the underlyingDataOutputStream.- Specified by:
- writeUTFin class- AbstractModelWriter
- Parameters:
- s- The- UTF encodedcharacters.
- Throws:
- IOException- Thrown if IO errors occurred.
 
- 
writeIntWrites a singleintto the underlyingDataOutputStream.- Specified by:
- writeIntin class- AbstractModelWriter
- Parameters:
- i- The- intvalue.
- Throws:
- IOException- Thrown if IO errors occurred.
 
- 
writeDoubleWrites a singledoubleto the underlyingDataOutputStream.- Specified by:
- writeDoublein class- AbstractModelWriter
- Parameters:
- d- The- doublevalue.
- Throws:
- IOException- Thrown if IO errors occurred.
 
- 
closeCloses the underlyingDataOutputStream.- Specified by:
- closein class- AbstractModelWriter
- Throws:
- IOException- Thrown if IO errors occurred.
 
 
-