|
||||||||||
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.SnmpIpv6Address
Class of SNMP Ipv6Address Variable - Sub-class of SnmpVar. This class can be used to created a SnmpVar object of OCTET STRING TC such as Ipv6Address, InetAddress and InetAddressIPv6. It also has methods to retrieve the value in different forms(eg. String, byte). Value is stored as String of length 16 with each lower byte corresponding to the raw IPV6 address.
Field Summary | |
static java.lang.String |
enc
The Standard encoding string on which all encoding will be done. |
Constructor Summary | |
SnmpIpv6Address(byte[] address)
Constructs a new SnmpIpv6Address by accepting the raw IP address - 16 bytes or 4 bytes for Ipv6Adderess/InetAddress datatype. |
|
SnmpIpv6Address(java.lang.String ipv6Address)
Constructs a new SnmpIpv6Address with the specified host name or IP address as a string. |
|
SnmpIpv6Address(java.lang.String ipv6Address,
java.lang.String enc)
Constructs a new SnmpIpv6Address with the specified host name or IP address as a string. |
Method Summary | |
static SnmpVar |
createVariable(java.lang.String value,
byte type)
Creates a new SnmpVar object with the specified value and of type SnmpAPI.STRING. |
java.lang.Object |
getVarObject()
Returns the value of this SnmpIpv6Address object as a printable string object. |
static java.lang.String |
Ipv6bToString(byte[] byteValue)
A converter from raw IP address (byte[]) to string. |
byte[] |
toBytes()
To return the value of this SnmpString object as raw bytes. |
java.lang.String |
toString()
To convert the value of this SnmpString object to a printable ipv6Address format |
java.lang.String |
toTagString()
To convert the value of this SnmpString object to a printable string where the type is tagged before the value with a tag STRING:. |
java.lang.Object |
toValue()
Returns the value of this SnmpString object as a printable string object. |
Methods inherited from class com.adventnet.snmp.snmp2.SnmpVar |
getError, getNumericValueAsString, getType, getTypeString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static java.lang.String enc
Constructor Detail |
public SnmpIpv6Address(java.lang.String ipv6Address)
ipv6Address
- host name or IP address as a string.public SnmpIpv6Address(java.lang.String ipv6Address, java.lang.String enc)
ipv6Address
- host name or IP address as a string.enc
- The string for the encoding scheme to be used.public SnmpIpv6Address(byte[] address)
address
- raw IPv6 address - 16 bytes/ 4 bytesMethod Detail |
public java.lang.Object getVarObject()
getVarObject
in class SnmpVar
public java.lang.Object toValue()
toValue
in class SnmpVar
public byte[] toBytes()
toBytes
in class SnmpVar
public java.lang.String toString()
toString
in class SnmpVar
public static java.lang.String Ipv6bToString(byte[] byteValue)
public java.lang.String toTagString()
toTagString
in class SnmpVar
public static SnmpVar createVariable(java.lang.String value, byte type) throws SnmpException
value
- String value for creating a new SnmpVar object.type
- SnmpAPI.STRING type (a constant from SnmpAPI) for creating a
new SnmpVar object.
SnmpException
- is thrown when the type is other than SnmpAPI.STRING.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |