public class TimeTicks extends UnsignedInteger32
TimeTicks class represents the time in 1/100 seconds
since some epoch (which should be have been defined in the
corresponding MIB specification).valueSMISYNTAXES_PROPERTIES| Constructor and Description |
|---|
TimeTicks() |
TimeTicks(long value) |
TimeTicks(TimeTicks other)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Clones this variable.
|
void |
decodeBER(BERInputStream inputStream)
Decodes a
Variable from an InputStream. |
void |
encodeBER(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.
|
void |
setValue(String value) |
long |
toMilliseconds()
Returns the timeticks value as milliseconds (instead 1/100 seconds).
|
String |
toString()
Returns string with the value of this
TimeTicks object as
"[days,]hh:mm:ss.hh". |
String |
toString(String pattern)
Formats the content of this
TimeTicks object according to
a supplied MessageFormat pattern. |
compareTo, equals, fromSubIndex, getBERLength, getValue, hashCode, setValue, toInt, toLong, toSubIndexcreateFromBER, createFromSyntax, equal, getBERPayloadLength, getSyntaxFromString, getSyntaxString, getSyntaxString, isDynamic, isExceptionpublic TimeTicks()
public TimeTicks(TimeTicks other)
other - a TimeTicks instance.public TimeTicks(long value)
public Object clone()
Variableclone in interface Variableclone in class UnsignedInteger32Variable with the same value.public int getSyntax()
AbstractVariablegetSyntax in interface VariablegetSyntax in class UnsignedInteger32public void encodeBER(OutputStream os) throws IOException
AbstractVariableVariable to an OutputStream.encodeBER in interface BERSerializableencodeBER in class UnsignedInteger32os - 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 String toString()
TimeTicks object as
"[days,]hh:mm:ss.hh".toString in interface VariabletoString in class UnsignedInteger32String representation of this object.public final void setValue(String value)
setValue in interface AssignableFromStringsetValue in class UnsignedInteger32public String toString(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 © 2016 SNMP4J.org. All Rights Reserved.