|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object snmp.SNMPObject snmp.SNMPInteger
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.
SNMPCounter32
,
SNMPGauge32
,
SNMPCounter64
Field Summary | |
protected byte |
tag
|
protected java.math.BigInteger |
value
|
Constructor Summary | |
|
SNMPInteger()
Initialize value to 0. |
|
SNMPInteger(java.math.BigInteger value)
|
protected |
SNMPInteger(byte[] enc)
Used to initialize from the BER encoding, usually received in a response from an SNMP device responding to an SNMPGetRequest. |
|
SNMPInteger(long value)
|
Method Summary | |
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. |
java.lang.Object |
getValue()
Returns a java.lang.BigInteger object with the current value. |
void |
setValue(java.lang.Object newValue)
Used to set the value with an instance of java.lang.Integer or java.lang.BigInteger. |
java.lang.String |
toString()
Should return an appropriate human-readable representation of the stored value. |
java.lang.String |
toString(int radix)
|
Methods inherited from class snmp.SNMPObject |
equals, hashCode |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.math.BigInteger value
protected byte tag
Constructor Detail |
public SNMPInteger()
public SNMPInteger(long value)
public SNMPInteger(java.math.BigInteger value)
protected SNMPInteger(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 newValue) throws SNMPBadValueException
setValue
in class SNMPObject
SNMPBadValueException
- Indicates an incorrect object type supplied.protected byte[] getBEREncoding()
getBEREncoding
in class SNMPObject
public void extractValueFromBEREncoding(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.public java.lang.String toString()
SNMPObject
toString
in class SNMPObject
public java.lang.String toString(int radix)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |