FileDocCategorySizeDatePackage
ResponseBytes.javaAPI DocAndroid 1.5 API2104Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.ocsp

ResponseBytes

public class ResponseBytes extends org.bouncycastle.asn1.ASN1Encodable

Fields Summary
org.bouncycastle.asn1.DERObjectIdentifier
responseType
org.bouncycastle.asn1.ASN1OctetString
response
Constructors Summary
public ResponseBytes(org.bouncycastle.asn1.DERObjectIdentifier responseType, org.bouncycastle.asn1.ASN1OctetString response)

        this.responseType = responseType;
        this.response = response;
    
public ResponseBytes(org.bouncycastle.asn1.ASN1Sequence seq)

        responseType = (DERObjectIdentifier)seq.getObjectAt(0);
        response = (ASN1OctetString)seq.getObjectAt(1);
    
Methods Summary
public static org.bouncycastle.asn1.ocsp.ResponseBytesgetInstance(org.bouncycastle.asn1.ASN1TaggedObject obj, boolean explicit)

        return getInstance(ASN1Sequence.getInstance(obj, explicit));
    
public static org.bouncycastle.asn1.ocsp.ResponseBytesgetInstance(java.lang.Object obj)

        if (obj == null || obj instanceof ResponseBytes)
        {
            return (ResponseBytes)obj;
        }
        else if (obj instanceof ASN1Sequence)
        {
            return new ResponseBytes((ASN1Sequence)obj);
        }

        throw new IllegalArgumentException("unknown object in factory");
    
public org.bouncycastle.asn1.ASN1OctetStringgetResponse()

        return response;
    
public org.bouncycastle.asn1.DERObjectIdentifiergetResponseType()

        return responseType;
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()
Produce an object suitable for an ASN1OutputStream.
ResponseBytes ::= SEQUENCE {
responseType OBJECT IDENTIFIER,
response OCTET STRING }

        ASN1EncodableVector    v = new ASN1EncodableVector();

        v.add(responseType);
        v.add(response);

        return new DERSequence(v);