|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--snmp.SNMPObject | +--snmp.SNMPObjectIdentifier
Class representing ASN.1 object identifiers. These are unbounded sequences (arrays) of natural numbers, written as dot-separated strings.
Constructor Summary | |
SNMPObjectIdentifier()
Create a new empty object identifier (0-length array). |
|
SNMPObjectIdentifier(byte[] enc)
Used to initialize from the BER encoding, as received in a response from an SNMP device responding to an SNMPGetRequest. |
|
SNMPObjectIdentifier(int[] digits)
Create a new object identifier from the supplied array of nonegative integer values. |
|
SNMPObjectIdentifier(java.lang.String digitString)
Create a new object identifier from the supplied string of dot-separated nonegative decimal integer values. |
Method Summary | |
boolean |
equals(SNMPObjectIdentifier other)
Test two obeject identifiers for equality. |
byte[] |
getBEREncoding()
Return BER encoding for this object identifier. |
java.lang.Object |
getValue()
Return array of integers corresponding to components of identifier. |
void |
setValue(java.lang.Object digits)
Used to set the value from an integer array containing the identifier components, or from a String containing a dot-separated sequence of nonegative values. |
java.lang.String |
toString()
Return dot-separated sequence of decimal values. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SNMPObjectIdentifier()
public SNMPObjectIdentifier(java.lang.String digitString) throws SNMPBadValueException
SNMPBadValueException
- Indicates incorrectly-formatted string supplied.public SNMPObjectIdentifier(int[] digits) throws SNMPBadValueException
SNMPBadValueException
- Negative value(s) supplied.public SNMPObjectIdentifier(byte[] enc) throws SNMPBadValueException
SNMPBadValueException
- Indicates an invalid BER encoding supplied. Shouldn't
occur in normal operation, i.e., when valid responses are received from devices.Method Detail |
public java.lang.Object getValue()
getValue
in class SNMPObject
public void setValue(java.lang.Object digits) throws SNMPBadValueException
setValue
in class SNMPObject
SNMPBadValueException
- Indicates an incorrect object type supplied, or negative array
elements, or an incorrectly formatted String.public byte[] getBEREncoding()
getBEREncoding
in class SNMPObject
public boolean equals(SNMPObjectIdentifier other)
public java.lang.String toString()
toString
in class SNMPObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |