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

        String vendor = tok.nextToken().trim();
        String name = tok.nextToken().trim();
        int code = Integer.parseInt(tok.nextToken().trim());
        String typeStr = tok.nextToken().trim();

        Class<? extends RadiusAttribute> type = getAttributeTypeClass(code, typeStr);
        AttributeType at = new AttributeType(Integer.parseInt(vendor), code, name, type);
        dictionary.addAttributeType(at);
    }
/**
     * Parses a line that declares a Vendor-Specific attribute.
     */
Parses a line that declares a Vendor-Specific attribute.
Parses a line that declares a Vendor - Specific attribute .
private static void parseVendorAttributeLine(WritableDictionary dictionary, StringTokenizer tok, int lineNum)
        throws IOException {
        if (tok.countTokens() != 4) {
            throw new IOException("syntax error on line " + lineNum);
        }
        String vendor = tok.nextToken().trim();
        String name = tok.nextToken().trim();
        int code = Integer.parseInt(tok.nextToken().trim());
        String typeStr = tok.nextToken().trim();
        Class<? extends RadiusAttribute> type = getAttributeTypeClass(code, typeStr);
        AttributeType at = new AttributeType(Integer.parseInt(vendor), code, name, type);
        dictionary.addAttributeType(at);
    }
private static void parseVendorAttributeLine ( WritableDictionary dictionary , StringTokenizer tok , int lineNum ) throws IOException { if ( tok . countTokens ( ) != 4 ) { throw new IOException ( "syntax error on line " + lineNum ) ; } String vendor = tok . nextToken ( ) . trim ( ) ; String name = tok . nextToken ( ) . trim ( ) ; int code = Integer . parseInt ( tok . nextToken ( ) . trim ( ) ) ; String typeStr = tok . nextToken ( ) . trim ( ) ; Class < ? extends RadiusAttribute > type = getAttributeTypeClass ( code , typeStr ) ; AttributeType at = new AttributeType ( Integer . parseInt ( vendor ) , code , name , type ) ; dictionary . addAttributeType ( at ) ; }
Parses a line that declares a Vendor-Specific attribute.
Parses a line that declares a Vendor - Specific attribute .