|
|||||||||
| 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.TimeTicks
public class TimeTicks
The TimeTicks class represents the time in 1/100 seconds
since some epoch (which should be have been defined in the
corresponding MIB specification).
| Field Summary |
|---|
| Fields inherited from class org.snmp4j.smi.UnsignedInteger32 |
|---|
value |
| Fields inherited from class org.snmp4j.smi.AbstractVariable |
|---|
SMISYNTAXES_PROPERTIES |
| Constructor Summary | |
|---|---|
TimeTicks()
|
|
TimeTicks(long value)
|
|
TimeTicks(TimeTicks other)
Copy constructor. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clones this variable. |
void |
decodeBER(BERInputStream inputStream)
Decodes a Variable from an InputStream. |
void |
encodeBER(java.io.OutputStream os)
Encodes a Variable to an OutputStream. |
void |
fromMilliseconds(long millis)
Sets the timeticks value by milliseconds. |
int |
getSyntax()
Gets the ASN.1 syntax identifier value of this SNMP variable. |
long |
toMilliseconds()
Returns the timeticks value as milliseconds (instead 1/100 seconds). |
java.lang.String |
toString()
Returns string with the value of this TimeTicks object as
"[days,]hh:mm:ss.hh". |
java.lang.String |
toString(java.lang.String pattern)
Formats the content of this TimeTicks object according to
a supplied MessageFormat pattern. |
| Methods inherited from class org.snmp4j.smi.UnsignedInteger32 |
|---|
compareTo, equals, fromSubIndex, getBERLength, getValue, hashCode, setValue, setValue, toInt, toLong, toSubIndex |
| 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 TimeTicks()
public TimeTicks(TimeTicks other)
other - a TimeTicks instance.public TimeTicks(long value)
| Method Detail |
|---|
public java.lang.Object clone()
Variable
clone in interface Variableclone in class UnsignedInteger32Variable with the same value.public int getSyntax()
AbstractVariable
getSyntax in interface VariablegetSyntax in class UnsignedInteger32
public void encodeBER(java.io.OutputStream os)
throws java.io.IOException
AbstractVariableVariable to an OutputStream.
encodeBER in interface BERSerializableencodeBER in class UnsignedInteger32os - 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.String toString()
TimeTicks object as
"[days,]hh:mm:ss.hh".
toString in interface VariabletoString in class UnsignedInteger32String representation of this object.public java.lang.String toString(java.lang.String pattern)
TimeTicks object according to
a supplied MessageFormat pattern.
pattern - a MessageFormat pattern that takes up to five parameters
which are: days, hours, minutes, seconds, and 1/100 seconds.
public long toMilliseconds()
getValue()*10.public void fromMilliseconds(long millis)
millis - sets the value as setValue(millis/10).
|
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 | ||||||||