Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.bouncycastle.asn1.x509;
 
 
public class PolicyInformation
    extends ASN1Object
    private ASN1Sequence          policyQualifiers;
    private PolicyInformation(
        ASN1Sequence seq)
    {
        if (seq.size() < 1 || seq.size() > 2)
        {
            throw new IllegalArgumentException("Bad sequence size: "
                    + seq.size());
        }
         = ASN1ObjectIdentifier.getInstance(seq.getObjectAt(0));
        if (seq.size() > 1)
        {
             = ASN1Sequence.getInstance(seq.getObjectAt(1));
        }
    }
    public PolicyInformation(
        ASN1ObjectIdentifier policyIdentifier)
    {
        this. = policyIdentifier;
    }
    public PolicyInformation(
        ASN1ObjectIdentifier policyIdentifier,
        ASN1Sequence        policyQualifiers)
    {
        this. = policyIdentifier;
        this. = policyQualifiers;
    }
    public static PolicyInformation getInstance(
        Object obj)
    {
        if (obj == null || obj instanceof PolicyInformation)
        {
            return (PolicyInformation)obj;
        }
        return new PolicyInformation(ASN1Sequence.getInstance(obj));
    }
    {
        return ;
    }
    
    {
        return ;
    }
    
    /* 
     * PolicyInformation ::= SEQUENCE {
     *      policyIdentifier   CertPolicyId,
     *      policyQualifiers   SEQUENCE SIZE (1..MAX) OF
     *              PolicyQualifierInfo OPTIONAL }
     */ 
    public ASN1Primitive toASN1Primitive()
    {
        ASN1EncodableVector v = new ASN1EncodableVector();
        
        v.add();
        if ( != null)
        {
            v.add();
        }
        
        return new DERSequence(v);
    }
New to GrepCode? Check out our FAQ X