public class SnmpUInt32 extends Object implements SnmpSyntax, Cloneable, Serializable
| Modifier and Type | Field and Description | 
|---|---|
static byte | 
ASNTYPE
The ASN.1 value for an unsigned integer value. 
 | 
| Constructor and Description | 
|---|
SnmpUInt32()
Default class constructor. 
 | 
SnmpUInt32(long value)
Constructs a SnmpUInt32 object with the specified value. 
 | 
SnmpUInt32(Long value)
Constructs a SnmpUInt32 object with the specified value. 
 | 
SnmpUInt32(SnmpUInt32 second)
Class copy constructor. 
 | 
SnmpUInt32(String value)
Simple class constructor that recovers the unsigned value from the passed
 string. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Object | 
clone()
Returns a duplicte of the current object 
 | 
int | 
decodeASN(byte[] buf,
         int offset,
         AsnEncoder encoder)
Used to decode the integer value from the ASN.1 buffer. 
 | 
SnmpSyntax | 
duplicate()
Returns a duplicte of the current object 
 | 
int | 
encodeASN(byte[] buf,
         int offset,
         AsnEncoder encoder)
Used to encode the integer value into an ASN.1 buffer. 
 | 
boolean | 
equals(Object obj)  | 
long | 
getValue()
Used to retreive the 32-bit unsigned value. 
 | 
int | 
hashCode()  | 
void | 
setValue(long value)
Used to set the 32-bit unsigned quantity. 
 | 
void | 
setValue(Long value)
Used to set the 32-bit unsigned quantity. 
 | 
static Long | 
toLong(SnmpUInt32 val)  | 
String | 
toString()
Returns the string representation of the object. 
 | 
byte | 
typeId()
Used to retreive the ASN.1 type for this object. 
 | 
public static final byte ASNTYPE
public SnmpUInt32()
public SnmpUInt32(long value)
value - The new 32-bit value.public SnmpUInt32(Long value)
value - The new 32-bit value.public SnmpUInt32(SnmpUInt32 second)
second - The object to copy the value from.public SnmpUInt32(String value)
value - The unsigned value encoded as a string.NullPointerException - Thrown if the passed value is a null pointer.IllegalArgumentException - Thrown if the decoded value evaluates to a negative value.NumberFormatException - Throws in the passed value cannot be decoded by the
             constructor.public long getValue()
public void setValue(long value)
value - The new value for the objectpublic void setValue(Long value)
value - The new value for the objectpublic byte typeId()
typeId in interface SnmpSyntaxpublic int encodeASN(byte[] buf,
                     int offset,
                     AsnEncoder encoder)
              throws AsnEncodingException
encodeASN in interface SnmpSyntaxbuf - The location to write the encoded dataoffset - The start of the encoded buffer.encoder - The ASN.1 encoder objectAsnEncodingException - Thrown if an encoding error occurspublic int decodeASN(byte[] buf,
                     int offset,
                     AsnEncoder encoder)
              throws AsnDecodingException
decodeASN in interface SnmpSyntaxbuf - The encoded ASN.1 dataoffset - The offset of the first byte of dataencoder - The ASN.1 decoder object.AsnDecodingException - Thrown if an encoding error occurspublic SnmpSyntax duplicate()
duplicate in interface SnmpSyntaxpublic Object clone()
public String toString()
public static Long toLong(SnmpUInt32 val)
Copyright © 2021. All rights reserved.