public class Accuracy extends java.lang.Object implements ASN1Type
Accuracy ::= SEQUENCE {
seconds INTEGER OPTIONAL,
millis [0] IMPLICIT INTEGER (1..999) OPTIONAL,
micros [1] IMPLICIT INTEGER (1..999) OPTIONAL
}
If either seconds, millis or micros is missing, then a value of zero MUST be taken for the missing field.
| Constructor and Description |
|---|
Accuracy()
Creates a new
Accuracy object with that does not contain
any components. |
Accuracy(ASN1Object obj)
Creates a new
Accuracy object from an ASN1Object. |
Accuracy(int seconds,
int millis,
int micros)
Creates a new
Accuracy object with the specified
components. |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(ASN1Object obj)
Decodes an Accuracy object from an
ASN1Object. |
java.math.BigInteger |
getMicros()
Returns the accuracy of the microseconds.
|
java.math.BigInteger |
getMillis()
Returns the accuracy of the milliseconds.
|
java.math.BigInteger |
getSeconds()
Returns the accuracy of the seconds.
|
void |
setMicros(java.math.BigInteger micros)
Sets the accuracy of the microseconds.
|
void |
setMillis(java.math.BigInteger millis)
Sets the accuracy of the milliseconds.
|
void |
setSeconds(java.math.BigInteger seconds)
Sets the accuracy of the seconds.
|
ASN1Object |
toASN1Object()
Encodes this
Accuracy object as an ASN1Object. |
java.lang.String |
toString()
Creates a text representation of the ASN.1 structure of this
Accuracy object. |
public Accuracy()
Accuracy object with that does not contain
any components.public Accuracy(int seconds,
int millis,
int micros)
Accuracy object with the specified
components.seconds - the accuracy of the secondsmillis - the accuracy of the millisecondsmicros - the accuracy of the microsecondspublic Accuracy(ASN1Object obj) throws CodingException
Accuracy object from an ASN1Object.
The ASN1Object must be an Accuracy structure.
obj - the ASN.1 representation of an Accuracy structureCodingException - thrown if an errors occurs while decoding the ANS1Objectjava.lang.IllegalArgumentException - thrown if the parameter is nullpublic java.math.BigInteger getSeconds()
null if the seconds component is
not setpublic java.math.BigInteger getMillis()
null if the millis component is not
setpublic java.math.BigInteger getMicros()
null if the micros component is not
setpublic void setSeconds(java.math.BigInteger seconds)
seconds - the seconds componentpublic void setMillis(java.math.BigInteger millis)
millis - the millis componentpublic void setMicros(java.math.BigInteger micros)
micros - the micros componentpublic void decode(ASN1Object obj) throws CodingException
ASN1Object.
The ASN1Object must contain an Accuracy structure.
decode in interface ASN1Typeobj - an ASN.1 representation of an Accuracy structureCodingException - thrown if an errors occurs while decoding the ANS1Objectjava.lang.IllegalArgumentException - thrown if the parameter is nullpublic ASN1Object toASN1Object()
Accuracy object as an ASN1Object.toASN1Object in interface ASN1Typepublic java.lang.String toString()
Accuracy object.toString in class java.lang.Object