org.tinyradius.dictionary
Class DictionaryParser

java.lang.Object
  extended by org.tinyradius.dictionary.DictionaryParser

public class DictionaryParser
extends java.lang.Object

Parses a dictionary in "Radiator format" and fills a WritableDictionary.


Constructor Summary
DictionaryParser()
           
 
Method Summary
static Dictionary parseDictionary(java.io.InputStream source)
          Returns a new dictionary filled with the contents from the given input stream.
static void parseDictionary(java.io.InputStream source, WritableDictionary dictionary)
          Parses the dictionary from the specified InputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DictionaryParser

public DictionaryParser()
Method Detail

parseDictionary

public static Dictionary parseDictionary(java.io.InputStream source)
                                  throws java.io.IOException
Returns a new dictionary filled with the contents from the given input stream.

Parameters:
source - input stream
Returns:
dictionary object
Throws:
java.io.IOException

parseDictionary

public static void parseDictionary(java.io.InputStream source,
                                   WritableDictionary dictionary)
                            throws java.io.IOException
Parses the dictionary from the specified InputStream.

Parameters:
source - input stream
dictionary - dictionary data is written to
Throws:
java.io.IOException - syntax errors
java.lang.RuntimeException - syntax errors