|
Bouncy Castle Cryptography 1.50 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.cms.Time
public class Time
RFC 5652: Dual-mode timestamp format producing either UTCTIme or GeneralizedTime.
Time ::= CHOICE { utcTime UTCTime, generalTime GeneralizedTime }
This has a constructor using java.util.Date for input which generates
a DERUTCTime
object if the
supplied datetime is in range 1950-01-01-00:00:00 UTC until 2049-12-31-23:59:60 UTC.
If the datetime value is outside that range, the generated object will be
DERGeneralizedTime
.
Constructor Summary | |
---|---|
Time(ASN1Primitive time)
Deprecated. use getInstance() |
|
Time(java.util.Date date)
Create a time object from a given date - if the year is in between 1950 and 2049 a UTCTime object is generated, otherwise a GeneralizedTime is used. |
Method Summary | |
---|---|
java.util.Date |
getDate()
Get java.util.Date version of date+time. |
static Time |
getInstance(ASN1TaggedObject obj,
boolean explicit)
|
static Time |
getInstance(java.lang.Object obj)
Return a Time object from the given object. |
java.lang.String |
getTime()
Get the date+tine as a String in full form century format. |
ASN1Primitive |
toASN1Primitive()
Produce an object suitable for an ASN1OutputStream. |
Methods inherited from class org.bouncycastle.asn1.ASN1Object |
---|
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Time(ASN1Primitive time)
public Time(java.util.Date date)
Method Detail |
---|
public static Time getInstance(ASN1TaggedObject obj, boolean explicit)
public static Time getInstance(java.lang.Object obj)
Accepted inputs:
Time
object
DERUTCTime
object
DERGeneralizedTime
object
obj
- the object we want converted.
java.lang.IllegalArgumentException
- if the object cannot be converted.public java.lang.String getTime()
public java.util.Date getDate()
public ASN1Primitive toASN1Primitive()
toASN1Primitive
in interface ASN1Encodable
toASN1Primitive
in class ASN1Object
|
Bouncy Castle Cryptography 1.50 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |