Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.bouncycastle.asn1.ocsp;
  
 
 public class CertStatus
     extends ASN1Object
     implements ASN1Choice
 {
     private int             tagNo;
     private ASN1Encodable    value;

    
create a CertStatus object with a tag of zero.
 
     public CertStatus()
     {
          = 0;
          = .;
     }
 
     public CertStatus(
         RevokedInfo info)
     {
          = 1;
          = info;
     }
 
     public CertStatus(
         int tagNo,
         ASN1Encodable    value)
     {
         this. = tagNo;
         this. = value;
     }
 
     public CertStatus(
         ASN1TaggedObject    choice)
     {
         this. = choice.getTagNo();
 
         switch (choice.getTagNo())
         {
         case 0:
              = .;
             break;
         case 1:
              = RevokedInfo.getInstance(choicefalse);
             break;
         case 2:
              = .;
         }
     }
 
     public static CertStatus getInstance(
         Object  obj)
     {
         if (obj == null || obj instanceof CertStatus)
         {
             return (CertStatus)obj;
         }
         else if (obj instanceof ASN1TaggedObject)
         {
             return new CertStatus((ASN1TaggedObject)obj);
         }
 
         throw new IllegalArgumentException("unknown object in factory: " + obj.getClass().getName());
     }
 
     public static CertStatus getInstance(
         ASN1TaggedObject obj,
         boolean          explicit)
     {
         return getInstance(obj.getObject()); // must be explicitly tagged
     }
     
     public int getTagNo()
     {
         return ;
     }
 
     public ASN1Encodable getStatus()
     {
         return ;
     }

    
Produce an object suitable for an ASN1OutputStream.
  CertStatus ::= CHOICE {
                  good        [0]     IMPLICIT NULL,
                  revoked     [1]     IMPLICIT RevokedInfo,
                  unknown     [2]     IMPLICIT UnknownInfo }
 
    {
        return new DERTaggedObject(false);
    }
New to GrepCode? Check out our FAQ X