src/main/java/org/tinyradius/packet/RadiusPacket.java
public void addAttribute(RadiusAttribute attribute) {
        if (attribute == null) {
            throw new NullPointerException("attribute is null");
        }
        attribute.setDictionary(getDictionary());
        if (attribute.getVendorId() == -1) {
            this.attributes.add(attribute);
        }
        else {
            VendorSpecificAttribute vsa = new VendorSpecificAttribute(attribute.getVendorId());
            vsa.addSubAttribute(attribute);
            this.attributes.add(vsa);
        }
    }
/**
     * Adds a Radius attribute to this packet. Can also be used
     * to add Vendor-Specific sub-attributes. If a attribute with
     * a vendor code != -1 is passed in, a VendorSpecificAttribute
     * is created for the sub-attribute.
     *
     * @param attribute RadiusAttribute object
     */
Adds a Radius attribute to this packet. Can also be used
to add Vendor-Specific sub-attributes. If a attribute with
a vendor code != -1 is passed in, a VendorSpecificAttribute
is created for the sub-attribute.

@param attribute RadiusAttribute object
Adds a Radius attribute to this packet . Can also be used to add Vendor - Specific sub - attributes . If a attribute with a vendor code ! = - 1 is passed in a VendorSpecificAttribute is created for the sub - attribute . @param attribute RadiusAttribute object
public void addAttribute(RadiusAttribute attribute) {
        if (attribute == null) {
            throw new NullPointerException("attribute is null");
        }
        attribute.setDictionary(getDictionary());
        if (attribute.getVendorId() == -1) {
            this.attributes.add(attribute);
        }
        else {
            VendorSpecificAttribute vsa = new VendorSpecificAttribute(attribute.getVendorId());
            vsa.addSubAttribute(attribute);
            this.attributes.add(vsa);
        }
    }
public void addAttribute ( RadiusAttribute attribute ) { if ( attribute == null ) { throw new NullPointerException ( "attribute is null" ) ; } attribute . setDictionary ( getDictionary ( ) ) ; if ( attribute . getVendorId ( ) == - 1 ) { this . attributes . add ( attribute ) ; } else { VendorSpecificAttribute vsa = new VendorSpecificAttribute ( attribute . getVendorId ( ) ) ; vsa . addSubAttribute ( attribute ) ; this . attributes . add ( vsa ) ; } }
Adds a Radius attribute to this packet.
Adds a Radius attribute to this packet .