opennlp.tools.dictionary.serializer
Class DictionarySerializer
java.lang.Object
opennlp.tools.dictionary.serializer.DictionarySerializer
public class DictionarySerializer
- extends java.lang.Object
This class is used by for reading and writing dictionaries of all kinds.
|
Method Summary |
static void |
create(java.io.InputStream in,
EntryInserter inserter)
Creates Entrys form the given InputStream and
forwards these Entrys to the EntryInserter. |
static void |
serialize(java.io.OutputStream out,
java.util.Iterator<Entry> entries)
Serializes the given entries to the given OutputStream. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DictionarySerializer
public DictionarySerializer()
create
public static void create(java.io.InputStream in,
EntryInserter inserter)
throws java.io.IOException,
InvalidFormatException
- Creates
Entrys form the given InputStream and
forwards these Entrys to the EntryInserter.
After creation is finished the provided InputStream is closed.
- Parameters:
in - inserter -
- Throws:
java.io.IOException
InvalidFormatException
serialize
public static void serialize(java.io.OutputStream out,
java.util.Iterator<Entry> entries)
throws java.io.IOException
- Serializes the given entries to the given
OutputStream.
After the serialization is finished the provided
OutputStream remains open.
- Parameters:
out - entries -
- Throws:
java.io.IOException - If an I/O error occurs
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.