|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.management.snmp.SnmpValue com.sun.management.snmp.SnmpOid com.sun.management.snmp.SnmpIpAddress
public class SnmpIpAddress
Represents an SNMP IpAddress.
Field Summary |
---|
Fields inherited from class com.sun.management.snmp.SnmpOid |
---|
componentCount, components |
Fields inherited from interface com.sun.management.snmp.SnmpDataTypeEnums |
---|
ApplFlag, BitStringTag, BooleanTag, Counter64Tag, CounterTag, CtxtFlag, errEndOfMibViewTag, errNoSuchInstanceTag, errNoSuchObjectTag, GaugeTag, IntegerTag, IpAddressTag, NsapTag, NullTag, ObjectIdentiferTag, ObjectIdentifierTag, OctetStringTag, OpaqueTag, SequenceTag, TableTag, TimeticksTag, UintegerTag, UnknownSyntaxTag |
Constructor Summary | |
---|---|
SnmpIpAddress(byte[] bytes)
Constructs a new SnmpIpAddress from the specified bytes array. |
|
SnmpIpAddress(long addr)
Constructs a new SnmpIpAddress from the specified long value. |
|
SnmpIpAddress(long b1,
long b2,
long b3,
long b4)
Constructs a new SnmpIpAddress from four long values. |
|
SnmpIpAddress(String dotAddress)
Constructs a new SnmpIpAddress from a dot-formatted String . |
Method Summary | |
---|---|
static void |
appendToOid(SnmpOid source,
SnmpOid dest)
Appends an SnmpOid representing an SnmpIpAddress to another OID. |
byte[] |
byteValue()
Converts the address value to its byte array form. |
String |
getTypeName()
Returns a textual description of the type object. |
static int |
nextOid(long[] index,
int start)
Scans an index OID, skips the address value and returns the position of the next value. |
String |
stringValue()
Converts the address to its String form. |
static SnmpOid |
toOid(long[] index,
int start)
Extracts the ip address from an index OID and returns its value converted as an SnmpOid . |
Methods inherited from class com.sun.management.snmp.SnmpOid |
---|
addToOid, addToOid, append, append, clone, compareTo, duplicate, equals, getLength, getOidArc, getSnmpOidTable, hashCode, insert, insert, isValid, longValue, longValue, resolveVarName, setSnmpOidTable, toBoolean, toByte, toInteger, toLong, toOctetString, toOid, toString, toUnsignedLong |
Methods inherited from class com.sun.management.snmp.SnmpValue |
---|
isEndOfMibViewValue, isNoSuchInstanceValue, isNoSuchObjectValue, toAsn1String |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SnmpIpAddress(byte[] bytes) throws IllegalArgumentException
SnmpIpAddress
from the specified bytes array.
bytes
- The four bytes composing the address.
IllegalArgumentException
- The length of the array is not equal to four.public SnmpIpAddress(long addr)
SnmpIpAddress
from the specified long value.
addr
- The initialization value.public SnmpIpAddress(String dotAddress) throws IllegalArgumentException
SnmpIpAddress
from a dot-formatted String
.
The dot-formatted String
is formulated x.x.x.x .
dotAddress
- The initialization value.
IllegalArgumentException
- The string does not correspond to an ip address.public SnmpIpAddress(long b1, long b2, long b3, long b4)
SnmpIpAddress
from four long values.
b1
- Byte 1.b2
- Byte 2.b3
- Byte 3.b4
- Byte 4.
IllegalArgumentException
- A value is outside of [0-255].Method Detail |
---|
public byte[] byteValue()
public String stringValue()
String
form.
Same as toString()
. Exists only to follow a naming scheme.
String
representation of the value.public static SnmpOid toOid(long[] index, int start) throws SnmpStatusException
SnmpOid
.
index
- The index array.start
- The position in the index array.
SnmpStatusException
- There is no ip address value
available at the start position.public static int nextOid(long[] index, int start) throws SnmpStatusException
index
- The index array.start
- The position in the index array.
SnmpStatusException
- There is no address value
available at the start position.public static void appendToOid(SnmpOid source, SnmpOid dest)
SnmpOid
representing an SnmpIpAddress
to another OID.
source
- An OID representing an SnmpIpAddress
value.dest
- Where source should be appended.public final String getTypeName()
getTypeName
in class SnmpOid
|
Open Source build 02 opendmk-1.0-b02 2007.10.01_19:17:46_MEST |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |