|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.snmp4j.smi.AbstractVariable
org.snmp4j.smi.UnsignedInteger32
org.snmp4j.smi.Counter32
public class Counter32
The 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).
| Field Summary |
|---|
| Fields inherited from class org.snmp4j.smi.UnsignedInteger32 |
|---|
value |
| Fields inherited from class org.snmp4j.smi.AbstractVariable |
|---|
SMISYNTAXES_PROPERTIES |
| Constructor Summary | |
|---|---|
Counter32()
|
|
Counter32(long value)
|
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clones this variable. |
void |
decodeBER(BERInputStream inputStream)
Decodes a Variable from an InputStream. |
void |
encodeBER(java.io.OutputStream outputStream)
Encodes a Variable to an OutputStream. |
boolean |
equals(java.lang.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. |
OID |
toSubIndex(boolean impliedLength)
Converts the value of this Variable to a (sub-)index
value. |
| Methods inherited from class org.snmp4j.smi.UnsignedInteger32 |
|---|
compareTo, getBERLength, getValue, hashCode, setValue, setValue, toInt, toLong, toString |
| Methods inherited from class org.snmp4j.smi.AbstractVariable |
|---|
createFromBER, createFromSyntax, getBERPayloadLength, getSyntaxFromString, getSyntaxString, getSyntaxString, isDynamic, isException |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Counter32()
public Counter32(long value)
| Method Detail |
|---|
public boolean equals(java.lang.Object o)
equals in interface Variableequals in class UnsignedInteger32public int getSyntax()
AbstractVariable
getSyntax in interface VariablegetSyntax in class UnsignedInteger32
public void encodeBER(java.io.OutputStream outputStream)
throws java.io.IOException
AbstractVariableVariable to an OutputStream.
encodeBER in interface BERSerializableencodeBER in class UnsignedInteger32outputStream - an OutputStream.
java.io.IOException - if an error occurs while writing to the stream.
public void decodeBER(BERInputStream inputStream)
throws java.io.IOException
AbstractVariableVariable from an InputStream.
decodeBER in interface BERSerializabledecodeBER in class UnsignedInteger32inputStream - an InputStream containing a BER encoded byte stream.
java.io.IOException - if the stream could not be decoded by using BER rules.public java.lang.Object clone()
Variable
clone in interface Variableclone in class UnsignedInteger32Variable with the same value.public void increment()
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 2003-2009 Frank Fock and Jochen Katz (SNMP4J.org) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||