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>
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericModelSerializer
public GenericModelSerializer()
create
public AbstractModel create(java.io.InputStream in)
throws java.io.IOException,
InvalidFormatException
- Description copied from interface:
ArtifactSerializer
- Creates the artifact from the provided
InputStream
.
The InputStream
remains open.
- Specified by:
create
in interface ArtifactSerializer<AbstractModel>
- Returns:
-
- Throws:
java.io.IOException
InvalidFormatException
serialize
public void serialize(AbstractModel artifact,
java.io.OutputStream out)
throws java.io.IOException
- Description copied from interface:
ArtifactSerializer
- Serializes the artifact to the provided
OutputStream
.
The OutputStream
remains open.
- Specified by:
serialize
in interface ArtifactSerializer<AbstractModel>
- Throws:
java.io.IOException
register
public static void register(java.util.Map<java.lang.String,ArtifactSerializer> factories)
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.