Package opennlp.tools.util.model
Interface ArtifactSerializer<T>
-
- All Known Implementing Classes:
AncoraSpanishHeadRules.HeadRulesSerializer,BrownCluster.BrownClusterSerializer,ByteArraySerializer,ChunkerModelSerializer,DictionarySerializer,GenericModelSerializer,HeadRules.HeadRulesSerializer,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 Tcreate(InputStream in)Creates the artifact from the providedInputStream.voidserialize(T artifact, OutputStream out)Serializes the artifact to the providedOutputStream.
-
-
-
Method Detail
-
create
T create(InputStream in) throws IOException
Creates the artifact from the providedInputStream. TheInputStreamremains open.- Returns:
- the artifact
- Throws:
IOException
-
serialize
void serialize(T artifact, OutputStream out) throws IOException
Serializes the artifact to the providedOutputStream. TheOutputStreamremains open.- Parameters:
artifact-out-- Throws:
IOException
-
-