Package opennlp.tools.util.model
Interface ArtifactSerializer<T>
- All Known Implementing Classes:
BrownCluster.BrownClusterSerializer,ByteArraySerializer,ChunkerModelSerializer,DictionarySerializer,GenericModelSerializer,POSModelSerializer,POSTaggerFactory.POSDictionarySerializer,WordClusterDictionary.WordClusterDictionarySerializer
public interface ArtifactSerializer<T>
Responsible to create an artifact from an
InputStream.-
Method Summary
Modifier and TypeMethodDescriptioncreate(InputStream in) Creates the artifact from the providedInputStream.voidserialize(T artifact, OutputStream out) Serializes the artifact to the providedOutputStream.
-
Method Details
-
create
Creates the artifact from the providedInputStream. TheInputStreamremains open.- Returns:
- the artifact
- Throws:
IOException
-
serialize
Serializes the artifact to the providedOutputStream. TheOutputStreamremains open.- Parameters:
artifact-out-- Throws:
IOException
-