src/main/java/org/tinyradius/attribute/RadiusAttribute.java
public void readAttribute(byte[] data, int offset, int length)
        throws RadiusException {
        if (length < 2) {
            throw new RadiusException("attribute length too small: " + length);
        }
        int attrType = data[offset] & 0x0ff;
        int attrLen = data[offset + 1] & 0x0ff;
        byte[] attrData = new byte[attrLen - 2];
        System.arraycopy(data, offset + 2, attrData, 0, attrLen - 2);
        setAttributeType(attrType);
        setAttributeData(attrData);
    }
/**
     * Reads in this attribute from the passed byte array.
     *
     * @param data
     */
Reads in this attribute from the passed byte array.

@param data
Reads in this attribute from the passed byte array . @param data
public void readAttribute(byte[] data, int offset, int length)
        throws RadiusException {
        if (length < 2) {
            throw new RadiusException("attribute length too small: " + length);
        }
        int attrType = data[offset] & 0x0ff;
        int attrLen = data[offset + 1] & 0x0ff;
        byte[] attrData = new byte[attrLen - 2];
        System.arraycopy(data, offset + 2, attrData, 0, attrLen - 2);
        setAttributeType(attrType);
        setAttributeData(attrData);
    }
public void readAttribute ( byte [ ] data , int offset , int length ) throws RadiusException { if ( length < 2 ) { throw new RadiusException ( "attribute length too small: " + length ) ; } int attrType = data [ offset ] & 0x0ff ; int attrLen = data [ offset + 1 ] & 0x0ff ; byte [ ] attrData = new byte [ attrLen - 2 ] ; System . arraycopy ( data , offset + 2 , attrData , 0 , attrLen - 2 ) ; setAttributeType ( attrType ) ; setAttributeData ( attrData ) ; }
Reads in this attribute from the passed byte array.
Reads in this attribute from the passed byte array .