public class IpAttribute extends RadiusAttribute
| 构造器和说明 |
|---|
IpAttribute()
Constructs an empty IP attribute.
|
IpAttribute(int type,
long ipNum)
Constructs an IP attribute.
|
IpAttribute(int type,
String value)
Constructs an IP attribute.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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(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.
|
createRadiusAttribute, createRadiusAttribute, createRadiusAttribute, getAttributeData, getAttributeType, getAttributeTypeObject, getDictionary, getVendorId, setAttributeData, setAttributeType, setDictionary, setVendorId, toString, writeAttributepublic IpAttribute()
public IpAttribute(int type,
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 intpublic String getAttributeValue()
getAttributeValue 在类中 RadiusAttributeRadiusAttribute.getAttributeValue()public void setAttributeValue(String value)
setAttributeValue 在类中 RadiusAttributevalue - value as a stringIllegalArgumentExceptionNumberFormatExceptionRadiusAttribute.setAttributeValue(java.lang.String)public long getIpAsLong()
public void setIpAsLong(long ip)
ip - public void readAttribute(byte[] data,
int offset,
int length)
throws RadiusException
Copyright © 2016. All rights reserved.