Class DictionaryEntryPersistor


  • public class DictionaryEntryPersistor
    extends java.lang.Object
    This class is used by for reading and writing dictionaries of all kinds.
    • Constructor Detail

      • DictionaryEntryPersistor

        public DictionaryEntryPersistor()
    • Method Detail

      • create

        public static boolean create​(java.io.InputStream in,
                                     EntryInserter inserter)
                              throws java.io.IOException
        Creates Entrys from the given InputStream and forwards these Entrys to the EntryInserter. After creation is finished the provided InputStream is closed.
        Parameters:
        in - stream to read entries from
        inserter - inserter to forward entries to
        Returns:
        isCaseSensitive attribute for Dictionary
        Throws:
        java.io.IOException
        InvalidFormatException
      • serialize

        @Deprecated
        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 - stream to serialize to
        entries - entries to serialize
        Throws:
        java.io.IOException - If an I/O error occurs
      • serialize

        public static void serialize​(java.io.OutputStream out,
                                     java.util.Iterator<Entry> entries,
                                     boolean casesensitive)
                              throws java.io.IOException
        Serializes the given entries to the given OutputStream. After the serialization is finished the provided OutputStream remains open.
        Parameters:
        out - stream to serialize to
        entries - entries to serialize
        casesensitive - indicates if the written dictionary should be case sensitive or case insensitive.
        Throws:
        java.io.IOException - If an I/O error occurs