opennlp.tools.dictionary.serializer
Class DictionarySerializer

java.lang.Object
  extended by opennlp.tools.dictionary.serializer.DictionarySerializer

public class DictionarySerializer
extends Object

This class is used by for reading and writing dictionaries of all kinds.


Constructor Summary
DictionarySerializer()
           
 
Method Summary
static void create(InputStream in, EntryInserter inserter)
          Creates Entrys form the given InputStream and forwards these Entrys to the EntryInserter.
static void serialize(OutputStream out, Iterator<Entry> entries)
          Serializes the given entries to the given OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DictionarySerializer

public DictionarySerializer()
Method Detail

create

public static void create(InputStream in,
                          EntryInserter inserter)
                   throws 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:
IOException
InvalidFormatException

serialize

public static void serialize(OutputStream out,
                             Iterator<Entry> entries)
                      throws IOException
Serializes the given entries to the given OutputStream. After the serialization is finished the provided OutputStream remains open.

Parameters:
out -
entries -
Throws:
IOException - If an I/O error occurs


Copyright © 2010. All Rights Reserved.