| java.lang.Object snmp.SNMPObject snmp.SNMPInteger
All known Subclasses: snmp.SNMPCounter64, snmp.SNMPUInteger32, snmp.SNMPTimeTicks, snmp.SNMPCounter32, snmp.SNMPGauge32,
SNMPInteger | public class SNMPInteger extends SNMPObject (Code) | | Defines an arbitrarily-sized integer value; there is no limit on size due to the use
of Java.lang.BigInteger to store the value internally. For an indicator which "pegs" at its
maximum value if initialized with a larger value, use SNMPGauge32; for a counter which wraps,
use SNMPCounter32 or SNMPCounter64.
See Also: snmp.SNMPCounter32 See Also: snmp.SNMPGauge32 See Also: snmp.SNMPCounter64 |
Method Summary | |
public void | extractValueFromBEREncoding(byte[] enc) Used to extract a value from the BER encoding of the value. | protected byte[] | getBEREncoding() Returns the full BER encoding (type, length, value) of the SNMPInteger subclass. | public Object | getValue() Returns a java.lang.BigInteger object with the current value. | public void | setValue(Object newValue) Used to set the value with an instance of java.lang.Integer or
java.lang.BigInteger. | public String | toString() | public String | toString(int radix) |
SNMPInteger | public SNMPInteger()(Code) | | Initialize value to 0.
|
SNMPInteger | public SNMPInteger(long value)(Code) | | |
SNMPInteger | protected SNMPInteger(byte[] enc) throws SNMPBadValueException(Code) | | Used to initialize from the BER encoding, usually 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. |
extractValueFromBEREncoding | public void extractValueFromBEREncoding(byte[] enc) throws SNMPBadValueException(Code) | | Used to extract a value from the BER encoding of the value. Called in constructors for
SNMPInteger subclasses.
throws: SNMPBadValueException - Indicates an invalid BER encoding supplied. Shouldn'toccur in normal operation, i.e., when valid responses are received from devices. |
getBEREncoding | protected byte[] getBEREncoding()(Code) | | Returns the full BER encoding (type, length, value) of the SNMPInteger subclass.
|
getValue | public Object getValue()(Code) | | Returns a java.lang.BigInteger object with the current value.
|
|
|