Class PlainTextDictionary

  • All Implemented Interfaces:
    Dictionary

    public class PlainTextDictionary
    extends Object
    implements Dictionary
    Dictionary represented by a text file.

    Format allowed: 1 word per line:
    word1
    word2
    word3

    • Constructor Detail

      • PlainTextDictionary

        public PlainTextDictionary​(File file)
                            throws IOException
        Creates a dictionary based on a File.

        NOTE: content is treated as UTF-8

        Throws:
        IOException
      • PlainTextDictionary

        public PlainTextDictionary​(InputStream dictFile)
        Creates a dictionary based on an inputstream.

        NOTE: content is treated as UTF-8

      • PlainTextDictionary

        public PlainTextDictionary​(Reader reader)
        Creates a dictionary based on a reader.