com.adventnet.snmp.snmp2
Class SnmpNetworkAddress
java.lang.Object
|
+--com.adventnet.snmp.snmp2.SnmpVar
|
+--com.adventnet.snmp.snmp2.SnmpString
|
+--com.adventnet.snmp.snmp2.SnmpIpAddress
|
+--com.adventnet.snmp.snmp2.SnmpNetworkAddress
- All Implemented Interfaces:
- java.io.Serializable
- public class SnmpNetworkAddress
- extends SnmpIpAddress
Class of SNMP NetworkAddress Variable - Sub-class of SnmpIpAddress.
This class can be used to create an 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. Only difference from IP
Address comes in the encoding of this type Index components.
- See Also:
- Serialized Form
Fields inherited from class com.adventnet.snmp.snmp2.SnmpString |
enc |
Constructor Summary |
SnmpNetworkAddress(byte[] b)
Constructs a new SnmpNetworkAddress by accepting the raw IP address
- 4 bytes. |
SnmpNetworkAddress(java.lang.String s)
Constructs a new SnmpNetworkAddress by accepting the host name
or IP address as a string. |
Method Summary |
java.lang.String |
toTagString()
To convert the object to a printable string tagged with NetworkAddress:
To convert the value of this SnmpNetworkAddress object to a printable
string where the type is tagged before the value with a tag
NetworkAddress:. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SnmpNetworkAddress
public SnmpNetworkAddress(java.lang.String s)
- Constructs a new SnmpNetworkAddress by accepting the host name
or IP address as a string.
- Parameters:
s
- The host name or IPAddress as a string.
SnmpNetworkAddress
public SnmpNetworkAddress(byte[] b)
- Constructs a new SnmpNetworkAddress by accepting the raw IP address
- 4 bytes.
- Parameters:
b
- The raw IP address - 4 bytes.
toTagString
public java.lang.String toTagString()
- To convert the object to a printable string tagged with NetworkAddress:
To convert the value of this SnmpNetworkAddress object to a printable
string where the type is tagged before the value with a tag
NetworkAddress:.
- Overrides:
toTagString
in class SnmpIpAddress
- Returns:
- the value of this SnmpNetworkAddress object as a printable
string where the type is tagged before the value with a tag -
NetworkAddress: .
Copyright (c)AdventNet Inc., 1996-2004