|
||||||||||
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.IpAttribute
public class IpAttribute
This class represents a Radius attribute for an IP number.
Constructor Summary | |
---|---|
IpAttribute()
Constructs an empty IP attribute. |
|
IpAttribute(int type,
long ipNum)
Constructs an IP attribute. |
|
IpAttribute(int type,
java.lang.String value)
Constructs an IP attribute. |
Method Summary | |
---|---|
java.lang.String |
getAttributeValue()
Returns the attribute value (IP number) as a string of the format "xx.xx.xx.xx". |
long |
getIpAsLong()
Returns the IP number as a 32 bit unsigned number. |
void |
readAttribute(byte[] data,
int offset,
int length)
Check attribute length. |
void |
setAttributeValue(java.lang.String value)
Sets the attribute value (IP number). |
void |
setIpAsLong(long ip)
Sets the IP number represented by this IpAttribute as a 32 bit unsigned number. |
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 IpAttribute()
public IpAttribute(int type, java.lang.String value)
type
- attribute type codevalue
- value, format: xx.xx.xx.xxpublic IpAttribute(int type, long ipNum)
type
- attribute type codeipNum
- value as a 32 bit unsigned intMethod Detail |
---|
public java.lang.String getAttributeValue()
getAttributeValue
in class RadiusAttribute
RadiusAttribute.getAttributeValue()
public void setAttributeValue(java.lang.String value)
setAttributeValue
in class RadiusAttribute
value
- value as a string
java.lang.IllegalArgumentException
java.lang.NumberFormatException
RadiusAttribute.setAttributeValue(java.lang.String)
public long getIpAsLong()
public void setIpAsLong(long ip)
ip
- 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 |