Package opennlp.tools.util.model
Class GenericModelSerializer
- java.lang.Object
-
- opennlp.tools.util.model.GenericModelSerializer
-
- All Implemented Interfaces:
ArtifactSerializer<AbstractModel>
public class GenericModelSerializer extends java.lang.Object implements ArtifactSerializer<AbstractModel>
-
-
Constructor Summary
Constructors Constructor Description GenericModelSerializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractModel
create(java.io.InputStream in)
Creates the artifact from the providedInputStream
.static void
register(java.util.Map<java.lang.String,ArtifactSerializer> factories)
void
serialize(AbstractModel artifact, java.io.OutputStream out)
Serializes the artifact to the providedOutputStream
.
-
-
-
Method Detail
-
create
public AbstractModel create(java.io.InputStream in) throws java.io.IOException
Description copied from interface:ArtifactSerializer
Creates the artifact from the providedInputStream
. TheInputStream
remains open.- Specified by:
create
in interfaceArtifactSerializer<AbstractModel>
- Returns:
- the artifact
- Throws:
java.io.IOException
-
serialize
public void serialize(AbstractModel artifact, java.io.OutputStream out) throws java.io.IOException
Description copied from interface:ArtifactSerializer
Serializes the artifact to the providedOutputStream
. TheOutputStream
remains open.- Specified by:
serialize
in interfaceArtifactSerializer<AbstractModel>
- Throws:
java.io.IOException
-
register
public static void register(java.util.Map<java.lang.String,ArtifactSerializer> factories)
-
-