FileDocCategorySizeDatePackage
TimeStampResp.javaAPI DocAndroid 1.5 API2097Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.tsp

TimeStampResp

public class TimeStampResp extends org.bouncycastle.asn1.ASN1Encodable

Fields Summary
org.bouncycastle.asn1.cmp.PKIStatusInfo
pkiStatusInfo
org.bouncycastle.asn1.cms.ContentInfo
timeStampToken
Constructors Summary
public TimeStampResp(org.bouncycastle.asn1.ASN1Sequence seq)


        Enumeration e = seq.getObjects();

        // status
        pkiStatusInfo = PKIStatusInfo.getInstance(e.nextElement());

        if (e.hasMoreElements())
        {
            timeStampToken = ContentInfo.getInstance(e.nextElement());
        }
    
public TimeStampResp(org.bouncycastle.asn1.cmp.PKIStatusInfo pkiStatusInfo, org.bouncycastle.asn1.cms.ContentInfo timeStampToken)

        this.pkiStatusInfo = pkiStatusInfo;
        this.timeStampToken = timeStampToken;
    
Methods Summary
public static org.bouncycastle.asn1.tsp.TimeStampRespgetInstance(java.lang.Object o)

        if (o == null || o instanceof TimeStampResp)
        {
            return (TimeStampResp) o;
        }
        else if (o instanceof ASN1Sequence)
        {
            return new TimeStampResp((ASN1Sequence) o);
        }

        throw new IllegalArgumentException(
                "unknown object in 'TimeStampResp' factory : "
                        + o.getClass().getName() + ".");
    
public org.bouncycastle.asn1.cmp.PKIStatusInfogetStatus()

        return pkiStatusInfo;
    
public org.bouncycastle.asn1.cms.ContentInfogetTimeStampToken()

        return timeStampToken;
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()
TimeStampResp ::= SEQUENCE {
status PKIStatusInfo,
timeStampToken TimeStampToken OPTIONAL }

        ASN1EncodableVector v = new ASN1EncodableVector();
        
        v.add(pkiStatusInfo);
        if (timeStampToken != null)
        {
            v.add(timeStampToken);
        }

        return new DERSequence(v);