|
HOME | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ireasoning.protocol.snmp.SnmpOctetString
com.ireasoning.protocol.snmp.SnmpIpAddress
This class represents Snmp IpAddress data type. The IpAddress type represents a 32-bit internet address. It is represented as an OCTET STRING of length 4, in network byte-order.
| Field Summary |
| Fields inherited from interface com.ireasoning.protocol.snmp.SnmpDataType |
BITS, BITSTRING, COUNTER32, COUNTER64, END_OF_MIB_VIEW, END_OF_MIB_VIEW_OBJECT, GAUGE32, INTEGER, IPADDRESS, NO_SUCH_INSTANCE, NO_SUCH_INSTANCE_OBJECT, NO_SUCH_OBJECT, NO_SUCH_OBJECT_OBJECT, NULL, OCTETSTRING, OID, OPAQUE, PDU, SEQUENCE, SEQUENCEOF, serialVersionUID, TIMETICKS, UNSIGNED32, VARBIND |
| Fields inherited from interface com.ireasoning.protocol.Msg |
ERROR_TYPE |
| Constructor Summary | |
SnmpIpAddress()
Constructs an SnmpIpAddress whose ip address is 0.0.0.0 |
|
SnmpIpAddress(byte[] data)
Constructs an SnmpIpAddress object with the passed in data |
|
SnmpIpAddress(InetAddress ipAddr)
Constructs an SnmpIpAddress with the passed in ipAddr object. |
|
SnmpIpAddress(SnmpIpAddress ipAddr)
Makes a copy of passed in ipAddr object |
|
SnmpIpAddress(String ipAddr)
Constructs an SnmpIpAddress with the passed in ipAddr object. |
|
| Method Summary | |
SnmpDataType |
copy()
Makes a copy of itself |
int |
encode(com.ireasoning.protocol.snmp.SnmpEncoder encoder)
For internal use |
int |
getType()
Returns SnmpDataType.IPADDRESS |
String |
getTypeString()
Returns "IpAddress" |
static boolean |
isValidIpAddress(String ipAddr)
Checks if the passed argument is a valid IPv4 address. |
InetAddress |
toInetAddress()
Converts to InetAddress object |
String |
toString()
Returns a String representation of this object. |
| Methods inherited from class com.ireasoning.protocol.snmp.SnmpOctetString |
convertPhysAddress, equals, getBytes, getLength, getValue, hashCode, setValue, toHexString, toPrintableString, toString, toString2 |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SnmpIpAddress()
public SnmpIpAddress(byte[] data)
public SnmpIpAddress(SnmpIpAddress ipAddr)
public SnmpIpAddress(String ipAddr)
IllegalArgumentException - raised if passed ipAddr is invalidpublic SnmpIpAddress(InetAddress ipAddr)
IllegalArgumentException - raised if passed ipAddr is invalid| Method Detail |
public int getType()
getType in interface SnmpDataTypegetType in class SnmpOctetStringpublic String getTypeString()
getTypeString in interface SnmpDataTypegetTypeString in class SnmpOctetStringpublic String toString()
SnmpOctetStringtoHexString() method.
toString in class SnmpOctetStringpublic InetAddress toInetAddress()
public SnmpDataType copy()
SnmpDataType
copy in interface SnmpDataTypecopy in class SnmpOctetString
public int encode(com.ireasoning.protocol.snmp.SnmpEncoder encoder)
throws SnmpEncodingException
SnmpDataType
encode in interface SnmpDataTypeencode in class SnmpOctetStringSnmpEncodingExceptionpublic static boolean isValidIpAddress(String ipAddr)
|
HOME | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||