opennlp.tools.util.model
Class GenericModelSerializer
java.lang.Object
opennlp.tools.util.model.GenericModelSerializer
- All Implemented Interfaces:
- ArtifactSerializer<opennlp.model.AbstractModel>
public class GenericModelSerializer
- extends Object
- implements ArtifactSerializer<opennlp.model.AbstractModel>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericModelSerializer
public GenericModelSerializer()
create
public opennlp.model.AbstractModel create(InputStream in)
throws IOException,
InvalidFormatException
- Description copied from interface:
ArtifactSerializer
- Creates the artifact from the provided
InputStream
.
The InputStream
remains open.
- Specified by:
create
in interface ArtifactSerializer<opennlp.model.AbstractModel>
- Returns:
-
- Throws:
IOException
InvalidFormatException
serialize
public void serialize(opennlp.model.AbstractModel artifact,
OutputStream out)
throws IOException
- Description copied from interface:
ArtifactSerializer
- Serializes the artifact to the provided
OutputStream
.
The OutputStream
remains open.
- Specified by:
serialize
in interface ArtifactSerializer<opennlp.model.AbstractModel>
- Throws:
IOException
register
public static void register(Map<String,ArtifactSerializer> factories)
Copyright © 2010. All Rights Reserved.