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 AbstractModelcreate(java.io.InputStream in)Creates the artifact from the providedInputStream.static voidregister(java.util.Map<java.lang.String,ArtifactSerializer> factories)voidserialize(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:ArtifactSerializerCreates the artifact from the providedInputStream. TheInputStreamremains open.- Specified by:
createin 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:ArtifactSerializerSerializes the artifact to the providedOutputStream. TheOutputStreamremains open.- Specified by:
serializein interfaceArtifactSerializer<AbstractModel>- Throws:
java.io.IOException
-
register
public static void register(java.util.Map<java.lang.String,ArtifactSerializer> factories)
-
-