opennlp.tools.util.model
Class GenericModelSerializer

java.lang.Object
  extended by opennlp.tools.util.model.GenericModelSerializer
All Implemented Interfaces:
ArtifactSerializer<opennlp.model.AbstractModel>

public class GenericModelSerializer
extends Object
implements ArtifactSerializer<opennlp.model.AbstractModel>


Constructor Summary
GenericModelSerializer()
           
 
Method Summary
 opennlp.model.AbstractModel create(InputStream in)
          Creates the artifact from the provided InputStream.
static void register(Map<String,ArtifactSerializer> factories)
           
 void serialize(opennlp.model.AbstractModel artifact, OutputStream out)
          Serializes the artifact to the provided OutputStream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericModelSerializer

public GenericModelSerializer()
Method Detail

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:
the artifact
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 © 2013 The Apache Software Foundation. All Rights Reserved.