com.adventnet.snmp.snmp2
Class SnmpGauge

java.lang.Object
  extended by com.adventnet.snmp.snmp2.SnmpVar
      extended by com.adventnet.snmp.snmp2.SnmpUnsignedInt
          extended by com.adventnet.snmp.snmp2.SnmpGauge
All Implemented Interfaces:
java.io.Serializable

public class SnmpGauge
extends SnmpUnsignedInt

Class of SNMP Gauge Variable - Sub-class of SnmpUnsignedInt.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.adventnet.snmp.snmp2.SnmpUnsignedInt
byteValue, value
 
Fields inherited from class com.adventnet.snmp.snmp2.SnmpVar
Type, varbindErrorVal
 
Constructor Summary
SnmpGauge(long s)
          Constructs a new SnmpGauge which takes a long as its argument.
 
Method Summary
(package private)  int encode(byte[] buff, int space)
          ASN encoder
 java.lang.String toTagString()
          To convert the value of this SnmpGauge object to a printable string, where the type is tagged before the value with the tag Gauge: .
 
Methods inherited from class com.adventnet.snmp.snmp2.SnmpUnsignedInt
equals, getNumericValueAsString, getVarObject, longValue, toBytes, toString, toValue
 
Methods inherited from class com.adventnet.snmp.snmp2.SnmpVar
createVariable, getError, getType, getTypeString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnmpGauge

public SnmpGauge(long s)
Constructs a new SnmpGauge which takes a long as its argument.

Parameters:
s - the long value to be used for creating a new SnmpGauge object. The valid value ranges from 0 to 4294967295(both inclusive).
Method Detail

toTagString

public java.lang.String toTagString()
To convert the value of this SnmpGauge object to a printable string, where the type is tagged before the value with the tag Gauge: .

Overrides:
toTagString in class SnmpUnsignedInt
Returns:
the value of this SnmpGauge object to a printable string where the type is tagged before the value with the tag Gauge: .

encode

int encode(byte[] buff,
           int space)
     throws java.lang.ArrayIndexOutOfBoundsException
ASN encoder

Overrides:
encode in class SnmpUnsignedInt
Parameters:
buff - The buffer into which the value is to be encoded
space - The number of free bytes in the buffer
Returns:
The number of free bytes in the buffer
Throws:
java.lang.ArrayIndexOutOfBoundsException - When there is insufficient space in buffer