|
||||||||||
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.Counter64
public class Counter64
The Counter64
class represents a 64bit unsigned integer type.
It is used for monotonically increasing values that wrap around at
2^64-1 (18446744073709551615).
The unsigned 64bit value is represented by a signed 64bit long value internally.
Field Summary |
---|
Fields inherited from class org.snmp4j.smi.AbstractVariable |
---|
SMISYNTAXES_PROPERTIES |
Constructor Summary | |
---|---|
Counter64()
|
|
Counter64(long value)
|
Method Summary | |
---|---|
java.lang.Object |
clone()
Clones this variable. |
int |
compareTo(java.lang.Object o)
|
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 |
getBERLength()
Returns the length of this Variable in bytes when encoded
according to the Basic Encoding Rules (BER). |
int |
getSyntax()
Gets the ASN.1 syntax identifier value of this SNMP variable. |
long |
getValue()
|
int |
hashCode()
|
void |
increment()
Increment the value of the counter by one. |
void |
setValue(long value)
|
void |
setValue(java.lang.String value)
|
int |
toInt()
Returns an integer representation of this variable if such a representation exists. |
long |
toLong()
Returns a long representation of this variable if such a representation exists. |
java.lang.String |
toString()
Gets a string representation of the variable. |
OID |
toSubIndex(boolean impliedLength)
Converts the value of this Variable to a (sub-)index
value. |
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 Counter64()
public Counter64(long value)
Method Detail |
---|
public void encodeBER(java.io.OutputStream outputStream) throws java.io.IOException
AbstractVariable
Variable
to an OutputStream
.
encodeBER
in interface BERSerializable
encodeBER
in class AbstractVariable
outputStream
- an OutputStream
.
java.io.IOException
- if an error occurs while writing to the stream.public void decodeBER(BERInputStream inputStream) throws java.io.IOException
AbstractVariable
Variable
from an InputStream
.
decodeBER
in interface BERSerializable
decodeBER
in class AbstractVariable
inputStream
- an InputStream
containing a BER encoded byte stream.
java.io.IOException
- if the stream could not be decoded by using BER rules.public int getSyntax()
AbstractVariable
getSyntax
in interface Variable
getSyntax
in class AbstractVariable
public int hashCode()
hashCode
in interface Variable
hashCode
in class AbstractVariable
public int getBERLength()
AbstractVariable
Variable
in bytes when encoded
according to the Basic Encoding Rules (BER).
getBERLength
in interface BERSerializable
getBERLength
in class AbstractVariable
public boolean equals(java.lang.Object o)
equals
in interface Variable
equals
in class AbstractVariable
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
compareTo
in interface Variable
compareTo
in class AbstractVariable
public java.lang.String toString()
AbstractVariable
toString
in interface Variable
toString
in class AbstractVariable
public void setValue(java.lang.String value)
setValue
in interface AssignableFromString
public void setValue(long value)
setValue
in interface AssignableFromLong
public long getValue()
public java.lang.Object clone()
Variable
clone
in interface Variable
clone
in class AbstractVariable
Variable
with the same value.public void increment()
public final int toInt()
AbstractVariable
toInt
in interface Variable
toInt
in class AbstractVariable
public final long toLong()
AbstractVariable
toLong
in interface AssignableFromLong
toLong
in interface Variable
toLong
in class AbstractVariable
public OID toSubIndex(boolean impliedLength)
AbstractVariable
Variable
to a (sub-)index
value.
toSubIndex
in interface Variable
toSubIndex
in class AbstractVariable
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.
public void fromSubIndex(OID subIndex, boolean impliedLength)
AbstractVariable
Variable
from the supplied (sub-)index.
fromSubIndex
in interface Variable
fromSubIndex
in class AbstractVariable
subIndex
- 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 2005-2010 Frank Fock (SNMP4J.org) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |