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, int type, byte[] data)
IntegerAttribute(Dictionary dictionary, int vendorId, int type, int value)
IntegerAttribute(Dictionary dictionary, int vendorId, int 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
encode, equals, getDictionary, getTag, getType, getValue, getVendorId, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.tinyradius.core.attribute.type.RadiusAttribute
decode, flatten, getAttributeName, getAttributeTemplate, getTagBytes, isEncoded, toByteArray
-
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.
-