|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.adventnet.snmp.snmp2.SnmpVar | +--com.adventnet.snmp.snmp2.SnmpString | +--com.adventnet.snmp.snmp2.SnmpIpAddress
Class of SNMP IpAddress Variable - Sub-class of SnmpVar. This class can be used to created a SnmpVar object of type SnmpIpAddress. It also has methods to retrieve the value in different forms(eg. String, byte). Value is stored as String of length 4 with each lower byte corresponding to the raw IP address.
Field Summary |
Fields inherited from class com.adventnet.snmp.snmp2.SnmpString |
enc |
Constructor Summary | |
SnmpIpAddress(byte[] b)
Constructs a new SnmpIpAddress by accepting the raw IP address - 4 bytes. |
|
SnmpIpAddress(java.lang.String s)
Constructs a new SnmpIpAddress with the specified host name or IP address as a string. |
Method Summary | |
java.lang.String |
getNumericValueAsString()
This method will throw UnsupportedOperationException since this is not a numeric data type. |
java.lang.Object |
getVarObject()
Returns the values of this SnmpIpAddress as a printable String object. |
static java.lang.String |
netbToString(byte[] rawIpAddr)
A converter from raw IP address (byte[]) to string. |
java.lang.String |
toHostName()
To convert the object to a host name. |
java.lang.String |
toString()
To convert the value of this SnmpIpAddress object to a printable string. |
java.lang.String |
toTagString()
To convert the value of this SnmpIpAddress object to a printable string where the type is tagged before the value with a tag IpAddress:. |
java.lang.Object |
toValue()
Returns the value of this SnmpIpAddress as a String object. |
Methods inherited from class com.adventnet.snmp.snmp2.SnmpString |
equals, toBytes, toByteString |
Methods inherited from class com.adventnet.snmp.snmp2.SnmpVar |
createVariable, getError, getType, getTypeString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SnmpIpAddress(java.lang.String s)
s
- host name or IP address as a string.public SnmpIpAddress(byte[] b)
b
- raw IP address - 4 bytesMethod Detail |
public java.lang.Object getVarObject()
getVarObject
in class SnmpString
public java.lang.Object toValue()
toValue
in class SnmpString
SnmpString.toValue()
,
SnmpIpAddress(byte[])
public java.lang.String toString()
toString
in class SnmpString
public java.lang.String toTagString()
toTagString
in class SnmpString
public java.lang.String toHostName()
public static java.lang.String netbToString(byte[] rawIpAddr)
rawIpAddr
- The IP Address as a byte[].
public java.lang.String getNumericValueAsString()
getNumericValueAsString
in class SnmpString
java.lang.UnsupportedOperationException
- Since this
is not a numeric data type.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |