All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.jaw.snmp.common.SnmpIpAddress
java.lang.Object
|
+----com.sun.jaw.snmp.common.SnmpValue
|
+----com.sun.jaw.snmp.common.SnmpOid
|
+----com.sun.jaw.snmp.common.SnmpIpAddress
- public class SnmpIpAddress
- extends SnmpOid
The SnmpIpAddress class represents an SNMP IpAddress.
-
SnmpIpAddress(byte[])
- Constructs a new SnmpInt with the specified bytes.
-
SnmpIpAddress(long)
-
-
SnmpIpAddress(long, long, long, long)
- Constructs a new address from four long values
-
SnmpIpAddress(String)
- Constructs a new SnmpInt from a string x.x.x.x
-
appendToOid(SnmpOid, SnmpOid)
- Append an SnmpOid representing an SnmpIpAddress to another Oid.
-
byteValue()
- Convert the address to an array of byte.
-
getTypeName()
- Returns a textual description of the object.
-
nextOid(long[], int)
- Scan an index oid, skip the integer value and returns the position
of the next value.
-
stringValue()
- Convert the address to a string.
-
toOid(long[], int)
- Extract the ip address from an index oid and returns its
value converted as an Oid.
SnmpIpAddress
public SnmpIpAddress(byte bytes[]) throws IllegalArgumentException
- Constructs a new SnmpInt with the specified bytes.
- Parameters:
- bytes - The four bytes composing the address.
- Throws: IllegalArgumentException
- One of the arguments passed to the method is illegal or inappropriate.
SnmpIpAddress
public SnmpIpAddress(long addr)
SnmpIpAddress
public SnmpIpAddress(String dotAddress) throws IllegalArgumentException
- Constructs a new SnmpInt from a string x.x.x.x
- Parameters:
- bytes - The address in dot notation form.
- Throws: IllegalArgumentException
- One of the arguments passed to the method is illegal or inappropriate.
SnmpIpAddress
public SnmpIpAddress(long b1,
long b2,
long b3,
long b4)
- Constructs a new address from four long values
- Parameters:
- b1 - Byte 1
- b2 - Byte 2
- b3 - Byte 3
- b4 - Byte 5 8-)))
- Throws: IllegalArgumentException
- A value is outside of [0-255]
byteValue
public byte[] byteValue()
- Convert the address to an array of byte.
- Returns:
- The byte array
stringValue
public String stringValue()
- Convert the address to a string.
Same as toString().
Exists only to follow a naming scheme.
- Returns:
- The string
getTypeName
public String getTypeName()
- Returns a textual description of the object.
- Returns:
- ASN.1 textual description.
- Overrides:
- getTypeName in class SnmpOid
toOid
public static SnmpOid toOid(long index[],
int start) throws SnmpStatusException
- Extract the ip address from an index oid and returns its
value converted as an Oid.
- Returns:
- The SnmpOid representing the ip address value
- Throws: SnmpStatusException
- There is no ip address value
available at start position
nextOid
public static int nextOid(long index[],
int start) throws SnmpStatusException
- Scan an index oid, skip the integer value and returns the position
of the next value.
- Returns:
- The position of the next value
- Throws: SnmpStatusException
- There is no integer value
available at start position
appendToOid
public static void appendToOid(SnmpOid source,
SnmpOid dest)
- Append an SnmpOid representing an SnmpIpAddress to another Oid.
- Parameters:
- source - An Oid representing an SnmpIpAddress value.
- dest - Where source should be appened.
All Packages Class Hierarchy This Package Previous Next Index