public class SnmpCounter64 extends java.lang.Object implements SnmpSyntax, java.lang.Cloneable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static byte |
ASNTYPE
The ASN.1 value for an unsigned integer value.
|
private java.math.BigInteger |
m_value
The internal 64-bit unsigned quantity
implemented as a 64-bit signed quantity
|
(package private) static long |
serialVersionUID
defines the serialization version
|
Constructor and Description |
---|
SnmpCounter64()
Default class constructor.
|
SnmpCounter64(java.math.BigInteger value)
Constructs a SnmpCounter64 object with the specified value.
|
SnmpCounter64(long value)
Constructs a SnmpCounter64 object with the specified value.
|
SnmpCounter64(SnmpCounter64 second)
Class copy constructor.
|
SnmpCounter64(java.lang.String value)
Simple class constructor that is used to create an initialize
the new instance with the unsigned value decoded from the
passed String argument.
|
Modifier and Type | Method and Description |
---|---|
java.lang.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.
|
java.math.BigInteger |
getValue()
Used to retreive the 64-bit unsigned value.
|
void |
setValue(java.math.BigInteger value)
Used to set the 64-bit unsigned quantity.
|
java.lang.String |
toString()
Returns the string representation of the object.
|
byte |
typeId()
Used to retreive the ASN.1 type for this object.
|
static final long serialVersionUID
private java.math.BigInteger m_value
public static final byte ASNTYPE
public SnmpCounter64()
public SnmpCounter64(long value)
value
- The new 64-bit value.public SnmpCounter64(java.math.BigInteger value)
value
- The new 64-bit value.public SnmpCounter64(SnmpCounter64 second)
second
- The object to copy the value from.public SnmpCounter64(java.lang.String value)
Simple class constructor that is used to create an initialize the new instance with the unsigned value decoded from the passed String argument. If the decoded argument is malformed, null, or evaluates to a negative value then an exception is generated.
value
- The string encoded value.java.lang.NumberFormatException
- Thrown if the passed value is
malformed and cannot be parsed.java.lang.IllegalArgumentException
- Throws if the passed value
evaluates to a negative value.java.lang.NullPointerException
- Throws if the passed value is
a null reference.public java.math.BigInteger getValue()
public void setValue(java.math.BigInteger value)
value
- The new value for the objectpublic byte typeId()
typeId
in interface SnmpSyntax
public int encodeASN(byte[] buf, int offset, AsnEncoder encoder) throws AsnEncodingException
encodeASN
in interface SnmpSyntax
buf
- 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 SnmpSyntax
buf
- 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 SnmpSyntax
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Generated by iurt on 2015.