opennlp.tools.util.model
Interface ArtifactSerializer<T>

All Known Implementing Classes:
ClassSerializer, FeatureGeneratorFactorySerializer, GenericModelSerializer

public interface ArtifactSerializer<T>

Responsible to create an artifact from an InputStream.


Method Summary
 T create(InputStream in)
          Creates the artifact from the provided InputStream.
 void serialize(T artifact, OutputStream out)
          Serializes the artifact to the provided OutputStream.
 

Method Detail

create

T create(InputStream in)
         throws IOException,
                InvalidFormatException
Creates the artifact from the provided InputStream. The InputStream remains open.

Returns:
the artifact
Throws:
IOException
InvalidFormatException

serialize

void serialize(T artifact,
               OutputStream out)
               throws IOException
Serializes the artifact to the provided OutputStream. The OutputStream remains open.

Parameters:
artifact -
out -
Throws:
IOException


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.