| |
|
| java.lang.Object snmp.SNMPObject snmp.SNMPObjectIdentifier
SNMPObjectIdentifier | public class SNMPObjectIdentifier extends SNMPObject (Code) | | Class representing ASN.1 object identifiers. These are unbounded sequences (arrays) of
natural numbers, written as dot-separated strings.
|
Field Summary | |
protected byte | tag |
Constructor Summary | |
public | SNMPObjectIdentifier() Create a new empty object identifier (0-length array). | public | SNMPObjectIdentifier(String digitString) Create a new object identifier from the supplied string of dot-separated nonegative
decimal integer values. | public | SNMPObjectIdentifier(int[] digits) Create a new object identifier from the supplied array of nonegative
integer values. | public | SNMPObjectIdentifier(long[] digits) Create a new object identifier from the supplied array of nonegative
long values. | protected | SNMPObjectIdentifier(byte[] enc) Used to initialize from the BER encoding, as received in a response from
an SNMP device responding to an SNMPGetRequest.
throws: SNMPBadValueException - Indicates an invalid BER encoding supplied. |
Method Summary | |
public boolean | equals(Object other) Checks the internal arrays for equality. | protected byte[] | getBEREncoding() Return BER encoding for this object identifier. | public Object | getValue() Return array of integers corresponding to components of identifier. | public int | hashCode() Generates a hash value so SNMP Object Identifiers can be used in Hashtables. | public void | setValue(Object digits) Used to set the value from an integer or long array containing the identifier components, or from
a String containing a dot-separated sequence of nonegative values. | public String | toString() Return dot-separated sequence of decimal values. |
SNMPObjectIdentifier | public SNMPObjectIdentifier()(Code) | | Create a new empty object identifier (0-length array).
|
SNMPObjectIdentifier | public SNMPObjectIdentifier(String digitString) throws SNMPBadValueException(Code) | | Create a new object identifier from the supplied string of dot-separated nonegative
decimal integer values.
throws: SNMPBadValueException - Indicates incorrectly-formatted string supplied. |
SNMPObjectIdentifier | public SNMPObjectIdentifier(int[] digits) throws SNMPBadValueException(Code) | | Create a new object identifier from the supplied array of nonegative
integer values.
throws: SNMPBadValueException - Negative value(s) supplied. |
SNMPObjectIdentifier | protected SNMPObjectIdentifier(byte[] enc) throws SNMPBadValueException(Code) | | Used to initialize from the BER encoding, as received in a response from
an SNMP device responding to an SNMPGetRequest.
throws: SNMPBadValueException - Indicates an invalid BER encoding supplied. Shouldn'toccur in normal operation, i.e., when valid responses are received from devices. |
equals | public boolean equals(Object other)(Code) | | Checks the internal arrays for equality.
|
getBEREncoding | protected byte[] getBEREncoding()(Code) | | Return BER encoding for this object identifier.
|
getValue | public Object getValue()(Code) | | Return array of integers corresponding to components of identifier.
|
hashCode | public int hashCode()(Code) | | Generates a hash value so SNMP Object Identifiers can be used in Hashtables.
|
setValue | public void setValue(Object digits) throws SNMPBadValueException(Code) | | Used to set the value from an integer or long array containing the identifier components, or from
a String containing a dot-separated sequence of nonegative values.
throws: SNMPBadValueException - Indicates an incorrect object type supplied, or negative arrayelements, or an incorrectly formatted String. |
toString | public String toString()(Code) | | Return dot-separated sequence of decimal values.
|
|
|
|