src/main/java/org/tinyradius/attribute/RadiusAttribute.java
public byte[] writeAttribute() {
        if (getAttributeType() == -1) {
            throw new IllegalArgumentException("attribute type not set");
        }
        if (attributeData == null) {
            throw new NullPointerException("attribute data not set");
        }

        byte[] attr = new byte[2 + attributeData.length];
        attr[0] = (byte) getAttributeType();
        attr[1] = (byte) (2 + attributeData.length);
        System.arraycopy(attributeData, 0, attr, 2, attributeData.length);
        return attr;
    }
/**
     * Returns this attribute encoded as a byte array.
     *
     * @return attribute
     */
Returns this attribute encoded as a byte array.

@return attribute
Returns this attribute encoded as a byte array . @return attribute
public byte[] writeAttribute() {
        if (getAttributeType() == -1) {
            throw new IllegalArgumentException("attribute type not set");
        }
        if (attributeData == null) {
            throw new NullPointerException("attribute data not set");
        }
        byte[] attr = new byte[2 + attributeData.length];
        attr[0] = (byte) getAttributeType();
        attr[1] = (byte) (2 + attributeData.length);
        System.arraycopy(attributeData, 0, attr, 2, attributeData.length);
        return attr;
    }
public byte [ ] writeAttribute ( ) { if ( getAttributeType ( ) == - 1 ) { throw new IllegalArgumentException ( "attribute type not set" ) ; } if ( attributeData == null ) { throw new NullPointerException ( "attribute data not set" ) ; } byte [ ] attr = new byte [ 2 + attributeData . length ] ; attr [ 0 ] = ( byte ) getAttributeType ( ) ; attr [ 1 ] = ( byte ) ( 2 + attributeData . length ) ; System . arraycopy ( attributeData , 0 , attr , 2 , attributeData . length ) ; return attr ; }
Returns this attribute encoded as a byte array.
Returns this attribute encoded as a byte array .