Package opennlp.tools.util.model
Schnittstelle ArtifactSerializer<T>
- Alle bekannten Implementierungsklassen:
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 an
InputStream
.-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcreate
(InputStream in) Creates an artifact from the providedInputStream
.void
serialize
(T artifact, OutputStream out) Serializes an artifact to the providedOutputStream
.
-
Methodendetails
-
create
Creates an artifact from the providedInputStream
.Note: The
InputStream
remains open.- Parameter:
in
- A valid, openInputStream
ready to read from.- Gibt zurück:
- A valid
artifact
. - Löst aus:
IOException
- Thrown if IO errors occurred during creation.
-
serialize
Serializes an artifact to the providedOutputStream
.Note: The
OutputStream
remains open.- Parameter:
artifact
- A validartifact
.out
- A valid, openOutputStream
ready to write to.- Löst aus:
IOException
- Thrown if IO errors occurred during serialization.
-