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.


Constructor Index

 o SnmpIpAddress(byte[])
Constructs a new SnmpInt with the specified bytes.
 o SnmpIpAddress(long)
 o SnmpIpAddress(long, long, long, long)
Constructs a new address from four long values
 o SnmpIpAddress(String)
Constructs a new SnmpInt from a string x.x.x.x

Method Index

 o appendToOid(SnmpOid, SnmpOid)
Append an SnmpOid representing an SnmpIpAddress to another Oid.
 o byteValue()
Convert the address to an array of byte.
 o getTypeName()
Returns a textual description of the object.
 o nextOid(long[], int)
Scan an index oid, skip the integer value and returns the position of the next value.
 o stringValue()
Convert the address to a string.
 o toOid(long[], int)
Extract the ip address from an index oid and returns its value converted as an Oid.

Constructors

 o 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.
 o SnmpIpAddress
 public SnmpIpAddress(long addr)
 o 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.
 o 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]

Methods

 o byteValue
 public byte[] byteValue()
Convert the address to an array of byte.

Returns:
The byte array
 o stringValue
 public String stringValue()
Convert the address to a string. Same as toString(). Exists only to follow a naming scheme.

Returns:
The string
 o getTypeName
 public String getTypeName()
Returns a textual description of the object.

Returns:
ASN.1 textual description.
Overrides:
getTypeName in class SnmpOid
 o 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
 o 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
 o 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