Class IntegerAttribute
java.lang.Object
org.tinyradius.core.attribute.type.OctetsAttribute
org.tinyradius.core.attribute.type.IntegerAttribute
- All Implemented Interfaces:
RadiusAttribute
public class IntegerAttribute extends OctetsAttribute
This class represents a Radius attribute which only contains a 32 bit integer.
-
Constructor Summary
Constructors Constructor Description IntegerAttribute(Dictionary dictionary, int vendorId, byte type, byte[] data)
IntegerAttribute(Dictionary dictionary, int vendorId, byte type, int value)
IntegerAttribute(Dictionary dictionary, int vendorId, byte type, java.lang.String value)
-
Method Summary
Modifier and Type Method Description int
getValueInt()
Returns the int value of this attribute.long
getValueLong()
Returns the long value of this attribute.java.lang.String
getValueString()
Returns the value of this attribute as a string.Methods inherited from class org.tinyradius.core.attribute.type.OctetsAttribute
decode, encode, equals, flatten, getAttributeName, getAttributeTemplate, getDictionary, getTag, getType, getValue, getVendorId, hashCode, toByteArray, toString
-
Constructor Details
-
Method Details
-
getValueLong
public long getValueLong()Returns the long value of this attribute.- Returns:
- a long
-
getValueInt
public int getValueInt()Returns the int value of this attribute. May be negative as Java ints are signed.- Returns:
- an int
-
getValueString
public java.lang.String getValueString()Returns the value of this attribute as a string. Tries to resolve enumerations.- Specified by:
getValueString
in interfaceRadiusAttribute
- Overrides:
getValueString
in classOctetsAttribute
- Returns:
- value of this attribute as a hex string.
-