src/main/java/org/tinyradius/dictionary/DictionaryParser.java
private static void parseValueLine(WritableDictionary dictionary, StringTokenizer tok, int lineNum)
        throws IOException {
        if (tok.countTokens() != 3) {
            throw new IOException("syntax error on line " + lineNum);
        }

        String typeName = tok.nextToken().trim();
        String enumName = tok.nextToken().trim();
        String valStr = tok.nextToken().trim();

        AttributeType at = dictionary.getAttributeTypeByName(typeName);
        if (at == null) {
            throw new IOException("unknown attribute type: " + typeName + ", line: " + lineNum);
        }
        else {
            at.addEnumerationValue(Integer.parseInt(valStr), enumName);
        }
    }
/**
     * Parses a VALUE line containing an enumeration value.
     */
Parses a VALUE line containing an enumeration value.
Parses a VALUE line containing an enumeration value .
private static void parseValueLine(WritableDictionary dictionary, StringTokenizer tok, int lineNum)
        throws IOException {
        if (tok.countTokens() != 3) {
            throw new IOException("syntax error on line " + lineNum);
        }
        String typeName = tok.nextToken().trim();
        String enumName = tok.nextToken().trim();
        String valStr = tok.nextToken().trim();
        AttributeType at = dictionary.getAttributeTypeByName(typeName);
        if (at == null) {
            throw new IOException("unknown attribute type: " + typeName + ", line: " + lineNum);
        }
        else {
            at.addEnumerationValue(Integer.parseInt(valStr), enumName);
        }
    }
private static void parseValueLine ( WritableDictionary dictionary , StringTokenizer tok , int lineNum ) throws IOException { if ( tok . countTokens ( ) != 3 ) { throw new IOException ( "syntax error on line " + lineNum ) ; } String typeName = tok . nextToken ( ) . trim ( ) ; String enumName = tok . nextToken ( ) . trim ( ) ; String valStr = tok . nextToken ( ) . trim ( ) ; AttributeType at = dictionary . getAttributeTypeByName ( typeName ) ; if ( at == null ) { throw new IOException ( "unknown attribute type: " + typeName + ", line: " + lineNum ) ; } else { at . addEnumerationValue ( Integer . parseInt ( valStr ) , enumName ) ; } }
Parses a VALUE line containing an enumeration value.
Parses a VALUE line containing an enumeration value .