1
package org.bouncycastle.asn1.cms;
5
import org.bouncycastle.asn1.*;
8
implements DEREncodable, ASN1Choice
12
public static Time getInstance(
16
return getInstance(obj.getObject());
22
if (!(time instanceof DERUTCTime)
23
&& !(time instanceof DERGeneralizedTime))
25
throw new IllegalArgumentException("unknown object passed to Time");
31
public static Time getInstance(
34
if (obj == null || obj instanceof Time)
38
else if (obj instanceof DERUTCTime)
40
return new Time((DERUTCTime)obj);
42
else if (obj instanceof DERGeneralizedTime)
44
return new Time((DERGeneralizedTime)obj);
47
throw new IllegalArgumentException("unknown object in factory");
50
public String getTime()
52
if (time instanceof DERUTCTime)
54
return ((DERUTCTime)time).getAdjustedTime();
58
return ((DERGeneralizedTime)time).getTime();
66
* generalTime GeneralizedTime }
69
public DERObject getDERObject()