Class DictionaryParser

java.lang.Object
org.tinyradius.core.dictionary.parse.DictionaryParser

public class DictionaryParser
extends java.lang.Object
Parses a dictionary in Radiator format and fills a WritableDictionary.
  • Method Details

    • newClasspathParser

      public static DictionaryParser newClasspathParser()
    • newFileParser

      public static DictionaryParser newFileParser()
    • parseDictionary

      public WritableDictionary parseDictionary​(java.lang.String resource) throws java.io.IOException
      Returns a new dictionary filled with the contents from the given input stream.
      Parameters:
      resource - location of resource, resolved depending on ResourceResolver
      Returns:
      dictionary object
      Throws:
      java.io.IOException - parse error reading from input
    • parseDictionary

      public void parseDictionary​(WritableDictionary dictionary, java.lang.String resource) throws java.io.IOException
      Parses the dictionary from the specified InputStream.
      Parameters:
      dictionary - dictionary data is written to
      resource - location of resource, resolved depending on ResourceResolver
      Throws:
      java.io.IOException - parse error reading from input