org.bouncycastle.asn1.cms

Class Time

Implemented Interfaces:
DEREncodable

public class Time
extends ASN1Encodable

Field Summary

Fields inherited from class org.bouncycastle.asn1.ASN1Encodable

BER, DER

Constructor Summary

Time(Date date)
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(DERObject time)

Method Summary

Date
getDate()
static Time
getInstance(Object obj)
static Time
getInstance(ASN1TaggedObject obj, boolean explicit)
String
getTime()
DERObject
toASN1Object()
Produce an object suitable for an ASN1OutputStream.

Methods inherited from class org.bouncycastle.asn1.ASN1Encodable

equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode, toASN1Object

Constructor Details

Time

public Time(Date date)
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

public Time(DERObject time)

Method Details

getDate

public Date getDate()

getInstance

public static Time getInstance(Object obj)

getInstance

public static Time getInstance(ASN1TaggedObject obj,
                               boolean explicit)

getTime

public String getTime()

toASN1Object

public DERObject toASN1Object()
Produce an object suitable for an ASN1OutputStream.
 Time ::= CHOICE {
             utcTime        UTCTime,
             generalTime    GeneralizedTime }
 
Overrides:
toASN1Object in interface ASN1Encodable