|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tinyradius.attribute.RadiusAttribute
org.tinyradius.attribute.IntegerAttribute
public class IntegerAttribute
This class represents a Radius attribute which only contains a 32 bit integer.
Constructor Summary | |
---|---|
IntegerAttribute()
Constructs an empty integer attribute. |
|
IntegerAttribute(int type,
int value)
Constructs an integer attribute with the given value. |
Method Summary | |
---|---|
java.lang.String |
getAttributeValue()
Returns the value of this attribute as a string. |
int |
getAttributeValueInt()
Returns the string value of this attribute. |
void |
readAttribute(byte[] data,
int offset,
int length)
Check attribute length. |
void |
setAttributeValue(int value)
Sets the value of this attribute. |
void |
setAttributeValue(java.lang.String value)
Sets the value of this attribute. |
Methods inherited from class org.tinyradius.attribute.RadiusAttribute |
---|
createRadiusAttribute, createRadiusAttribute, createRadiusAttribute, getAttributeData, getAttributeType, getAttributeTypeObject, getDictionary, getVendorId, setAttributeData, setAttributeType, setDictionary, setVendorId, toString, writeAttribute |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntegerAttribute()
public IntegerAttribute(int type, int value)
type
- attribute typevalue
- attribute valueMethod Detail |
---|
public int getAttributeValueInt()
public java.lang.String getAttributeValue()
getAttributeValue
in class RadiusAttribute
RadiusAttribute.getAttributeValue()
public void setAttributeValue(int value)
value
- integer valuepublic void setAttributeValue(java.lang.String value)
setAttributeValue
in class RadiusAttribute
value
- value as a string
java.lang.NumberFormatException
- if value is not a number and constant cannot be resolvedRadiusAttribute.setAttributeValue(java.lang.String)
public void readAttribute(byte[] data, int offset, int length) throws RadiusException
readAttribute
in class RadiusAttribute
RadiusException
RadiusAttribute.readAttribute(byte[], int, int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |