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 anInputStream
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
create(java.io.InputStream in)
Creates the artifact from the providedInputStream
.void
serialize(T artifact, java.io.OutputStream out)
Serializes the artifact to the providedOutputStream
.
-
-
-
Method Detail
-
create
T create(java.io.InputStream in) throws java.io.IOException
Creates the artifact from the providedInputStream
. TheInputStream
remains open.- Returns:
- the artifact
- Throws:
java.io.IOException
-
serialize
void serialize(T artifact, java.io.OutputStream out) throws java.io.IOException
Serializes the artifact to the providedOutputStream
. TheOutputStream
remains open.- Parameters:
artifact
-out
-- Throws:
java.io.IOException
-
-