Package opennlp.tools.util.model
Class DictionarySerializer
java.lang.Object
opennlp.tools.util.model.DictionarySerializer
- All Implemented Interfaces:
ArtifactSerializer<Dictionary>
An
ArtifactSerializer implementation for dictionaries.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(InputStream in) Creates an artifact from the providedInputStream.voidserialize(Dictionary dictionary, OutputStream out) Serializes an artifact to the providedOutputStream.
-
Constructor Details
-
DictionarySerializer
public DictionarySerializer()
-
-
Method Details
-
create
Description copied from interface:ArtifactSerializerCreates an artifact from the providedInputStream.Note: The
InputStreamremains open.- Specified by:
createin interfaceArtifactSerializer<Dictionary>- Parameters:
in- A valid, openInputStreamready to read from.- Returns:
- A valid
artifact. - Throws:
IOException- Thrown if IO errors occurred during creation.
-
serialize
Description copied from interface:ArtifactSerializerSerializes an artifact to the providedOutputStream.Note: The
OutputStreamremains open.- Specified by:
serializein interfaceArtifactSerializer<Dictionary>- Parameters:
dictionary- A validartifact.out- A valid, openOutputStreamready to write to.- Throws:
IOException- Thrown if IO errors occurred during serialization.
-