Klasse DictionaryEntryPersistor
java.lang.Object
opennlp.tools.dictionary.serializer.DictionaryEntryPersistor
A persistor used by for reading and writing
dictionaries
of all kinds.- Siehe auch:
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic boolean
create
(InputStream in, EntryInserter inserter) static void
serialize
(OutputStream out, Iterator<Entry> entries, boolean casesensitive) Serializes the given entries to the givenOutputStream
.
-
Konstruktordetails
-
DictionaryEntryPersistor
public DictionaryEntryPersistor()
-
-
Methodendetails
-
create
CreatesEntry
s from the givenInputStream
and forwards theseEntry
s to theEntryInserter
.Note: After creation is finished the provided
InputStream
is closed.- Parameter:
in
- The openInputStream
to read entries from.inserter
- inserter to forward entries to- Gibt zurück:
- The
isCaseSensitive
attribute of aDictionary
. - Löst aus:
IOException
- Thrown if IO errors occurred.InvalidFormatException
- Thrown if parameters were invalid.
-
serialize
public static void serialize(OutputStream out, Iterator<Entry> entries, boolean casesensitive) throws IOException Serializes the given entries to the givenOutputStream
.Note: After the serialization is finished the provided
OutputStream
remains open.- Parameter:
out
- TheOutputStream
to serialize to.entries
- Theentries
to serialize.casesensitive
- Indicates if the written dictionary should be case-sensitive, or not.- Löst aus:
IOException
- Thrown if IO errors occurred.InvalidFormatException
- Thrown if parameters were invalid.
-