|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.snmp.snmp2.SnmpVar
com.adventnet.snmp.snmp2.SnmpUnsignedInt
public class SnmpUnsignedInt
Class of SNMP Unsigned Integer Variable. This class can be used to created an SnmpVar object of type SnmpUnsignedInt. It also has methods to retrieve the value in different forms(eg. long String, byte).
| Field Summary | |
|---|---|
(package private) byte[] |
byteValue
|
(package private) long |
value
|
| Fields inherited from class com.adventnet.snmp.snmp2.SnmpVar |
|---|
Type, varbindErrorVal |
| Constructor Summary | |
|---|---|
SnmpUnsignedInt(long val)
Constructs a new SnmpUnsignedInt by taking a long type as its argument. |
|
| Method Summary | |
|---|---|
(package private) int |
encode(byte[] buff,
int space)
ASN encoder |
boolean |
equals(java.lang.Object obj)
Returns true, if both the SnmpUnsignedInt objects have the same value and false otherwise. |
java.lang.String |
getNumericValueAsString()
This method returns the numeric value of the UNSIGNED32 data type in decimal ( base 10 ) format. |
java.lang.Object |
getVarObject()
Returns the value of this SnmpUnsignedInt as a Long object. |
long |
longValue()
Returns the value of this SnmpUnsignedInt as a long value. |
byte[] |
toBytes()
Returns the value of this SnmpUnsignedInt as raw bytes. |
java.lang.String |
toString()
To convert the value of this SnmpUnsignedInt to a printable string used in printing variables. |
java.lang.String |
toTagString()
To convert the value of this SnmpUnsignedInt object to a printable string where the type is tagged before the value with a tag UNSIGNED: . |
java.lang.Object |
toValue()
Returns the value of this SnmpUnsignedInt as a Long object. |
| 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 |
| Field Detail |
|---|
long value
byte[] byteValue
| Constructor Detail |
|---|
public SnmpUnsignedInt(long val)
val - the long type for creating a new SnmpUnsignedInt object.
The valid values ranges from 0 to 4294967295(both inclusive).the - unsigned integer value. If this value is given lesser than
zero, then it will be taken as zero and if it is given greater than
the maximun, then the maximum value will be taken.| Method Detail |
|---|
public java.lang.Object getVarObject()
getVarObject in class SnmpVarpublic java.lang.Object toValue()
toValue in class SnmpVarpublic long longValue()
public java.lang.String toString()
toString in class SnmpVarpublic java.lang.String toTagString()
toTagString in class SnmpVarpublic byte[] toBytes()
toBytes in class SnmpVarpublic java.lang.String getNumericValueAsString()
getNumericValueAsString in class SnmpVarpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
int encode(byte[] buff,
int space)
throws java.lang.ArrayIndexOutOfBoundsException
encode in class SnmpVarbuff - The buffer into which the value is to be encodedspace - The number of free bytes in the buffer
throws - ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||