Class DictionaryEntryPersistor
java.lang.Object
opennlp.tools.dictionary.serializer.DictionaryEntryPersistor
A persistor used by for reading and writing 
dictionaries
 of all kinds.- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleancreate(InputStream in, EntryInserter inserter) static voidserialize(OutputStream out, Iterator<Entry> entries, boolean casesensitive) Serializes the given entries to the givenOutputStream.
- 
Constructor Details- 
DictionaryEntryPersistorpublic DictionaryEntryPersistor()
 
- 
- 
Method Details- 
createCreatesEntrys from the givenInputStreamand forwards theseEntrys to theEntryInserter.Note: After creation is finished the provided InputStreamis closed.- Parameters:
- in- The open- InputStreamto read entries from.
- inserter- inserter to forward entries to
- Returns:
- The isCaseSensitiveattribute of aDictionary.
- Throws:
- IOException- Thrown if IO errors occurred.
- InvalidFormatException- Thrown if parameters were invalid.
 
- 
serializepublic 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 OutputStreamremains open.- Parameters:
- out- The- OutputStreamto serialize to.
- entries- The- entriesto serialize.
- casesensitive- Indicates if the written dictionary should be case-sensitive, or not.
- Throws:
- IOException- Thrown if IO errors occurred.
- InvalidFormatException- Thrown if parameters were invalid.
 
 
-