Class Time
-
- All Implemented Interfaces:
-
io.anyline.nfc.bouncycastle.asn1.ASN1Choice
,io.anyline.nfc.bouncycastle.asn1.ASN1Encodable
,io.anyline.nfc.bouncycastle.util.Encodable
public class Time extends ASN1Object implements ASN1Choice
-
-
Constructor Summary
Constructors Constructor Description Time(ASN1Primitive time)
Time(Date time)
Creates a time object from a given date - if the date is between 1950 and 2049 a UTCTime object is generated, otherwise a GeneralizedTime is used. Time(Date time, Locale locale)
Creates a time object from a given date and locale - if the date is between 1950 and 2049 a UTCTime object is generated, otherwise a GeneralizedTime is used.
-
Method Summary
Modifier and Type Method Description static Time
getInstance(ASN1TaggedObject obj, boolean explicit)
static Time
getInstance(Object obj)
String
getTime()
Date
getDate()
ASN1Primitive
toASN1Primitive()
Produce an object suitable for an ASN1OutputStream. String
toString()
-
-
Constructor Detail
-
Time
Time(ASN1Primitive time)
-
Time
Time(Date time)
Creates a time object from a given date - if the date is between 1950 and 2049 a UTCTime object is generated, otherwise a GeneralizedTime is used.- Parameters:
time
- a date object representing the time of interest.
-
Time
Time(Date time, Locale locale)
Creates a time object from a given date and locale - if the date is between 1950 and 2049 a UTCTime object is generated, otherwise a GeneralizedTime is used.- Parameters:
time
- a date object representing the time of interest.locale
- an appropriate Locale for producing an ASN.1 GeneralizedTime value.
-
-
Method Detail
-
getInstance
static Time getInstance(ASN1TaggedObject obj, boolean explicit)
-
getInstance
static Time getInstance(Object obj)
-
toASN1Primitive
ASN1Primitive toASN1Primitive()
Produce an object suitable for an ASN1OutputStream.
Time ::= CHOICE { utcTime UTCTime, generalTime GeneralizedTime }
-
-
-
-