Package org.tinyradius.dictionary
Class DictionaryParser
java.lang.Object
org.tinyradius.dictionary.DictionaryParser
public class DictionaryParser
extends java.lang.Object
Parses a dictionary in Radiator format and fills a WritableDictionary.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DictionaryParser.ResourceResolver
-
Method Summary
Modifier and Type Method Description static DictionaryParser
newClasspathParser()
static DictionaryParser
newFileParser()
WritableDictionary
parseDictionary(java.lang.String resource)
Returns a new dictionary filled with the contents from the given input stream.void
parseDictionary(WritableDictionary dictionary, java.lang.String resource)
Parses the dictionary from the specified InputStream.
-
Method Details
-
newClasspathParser
-
newFileParser
-
parseDictionary
Returns a new dictionary filled with the contents from the given input stream.- Parameters:
resource
- location of resource, resolved depending onDictionaryParser.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.IOExceptionParses the dictionary from the specified InputStream.- Parameters:
dictionary
- dictionary data is written toresource
- location of resource, resolved depending onDictionaryParser.ResourceResolver
- Throws:
java.io.IOException
- parse error reading from input
-