public class Counter32 extends UnsignedInteger32
Counter32 class allows all the functionality of unsigned
integers but is recognized as a distinct SMI type, which is used for
monotonically increasing values that wrap around at 2^32-1 (4294967295).| Modifier and Type | Field and Description |
|---|---|
static long |
MAX_COUNTER32_VALUE |
valueSMISYNTAXES_PROPERTIES| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Clones this variable.
|
void |
decodeBER(BERInputStream inputStream)
Decodes a
Variable from an InputStream. |
void |
encodeBER(OutputStream outputStream)
Encodes a
Variable to an OutputStream. |
boolean |
equals(Object o) |
void |
fromSubIndex(OID subIndex,
boolean impliedLength)
Sets the value of this
Variable from the supplied (sub-)index. |
int |
getSyntax()
Gets the ASN.1 syntax identifier value of this SNMP variable.
|
void |
increment()
Increment the value of the counter by one.
|
long |
increment(long increment)
Increment the value by more than one in one step.
|
OID |
toSubIndex(boolean impliedLength)
Converts the value of this
Variable to a (sub-)index
value. |
compareTo, getBERLength, getValue, hashCode, setValue, setValue, toInt, toLong, toStringcreateFromBER, createFromSyntax, equal, getBERPayloadLength, getSyntaxFromString, getSyntaxString, getSyntaxString, isDynamic, isExceptionpublic static final long MAX_COUNTER32_VALUE
public boolean equals(Object o)
equals in interface Variableequals in class UnsignedInteger32public int getSyntax()
AbstractVariablegetSyntax in interface VariablegetSyntax in class UnsignedInteger32public void encodeBER(OutputStream outputStream) throws IOException
AbstractVariableVariable to an OutputStream.encodeBER in interface BERSerializableencodeBER in class UnsignedInteger32outputStream - an OutputStream.IOException - if an error occurs while writing to the stream.public void decodeBER(BERInputStream inputStream) throws IOException
AbstractVariableVariable from an InputStream.decodeBER in interface BERSerializabledecodeBER in class UnsignedInteger32inputStream - an InputStream containing a BER encoded byte stream.IOException - if the stream could not be decoded by using BER rules.public Object clone()
Variableclone in interface Variableclone in class UnsignedInteger32Variable with the same value.public void increment()
public long increment(long increment)
increment - an increment value greater than zero.public OID toSubIndex(boolean impliedLength)
AbstractVariableVariable to a (sub-)index
value.toSubIndex in interface VariabletoSubIndex in class UnsignedInteger32impliedLength - specifies if the sub-index has an implied length. This parameter applies
to variable length variables only (e.g. OctetString and
OID). For other variables it has no effect.public void fromSubIndex(OID subIndex, boolean impliedLength)
AbstractVariableVariable from the supplied (sub-)index.fromSubIndex in interface VariablefromSubIndex in class UnsignedInteger32subIndex - the sub-index OID.impliedLength - specifies if the sub-index has an implied length. This parameter applies
to variable length variables only (e.g. OctetString and
OID). For other variables it has no effect.Copyright © 2016 SNMP4J.org. All Rights Reserved.