Package opennlp.tools.util.model
Class GenericModelSerializer
- java.lang.Object
-
- opennlp.tools.util.model.GenericModelSerializer
-
- All Implemented Interfaces:
ArtifactSerializer<AbstractModel>
public class GenericModelSerializer extends 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(InputStream in)
Creates the artifact from the providedInputStream
.static void
register(Map<String,ArtifactSerializer> factories)
void
serialize(AbstractModel artifact, OutputStream out)
Serializes the artifact to the providedOutputStream
.
-
-
-
Method Detail
-
create
public AbstractModel create(InputStream in) throws 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:
IOException
-
serialize
public void serialize(AbstractModel artifact, OutputStream out) throws IOException
Description copied from interface:ArtifactSerializer
Serializes the artifact to the providedOutputStream
. TheOutputStream
remains open.- Specified by:
serialize
in interfaceArtifactSerializer<AbstractModel>
- Throws:
IOException
-
register
public static void register(Map<String,ArtifactSerializer> factories)
-
-