FileDocCategorySizeDatePackage
NoticeReference.javaAPI DocAzureus 3.0.3.43635Tue Jun 08 05:12:56 BST 2004org.bouncycastle.asn1.x509

NoticeReference

public class NoticeReference extends org.bouncycastle.asn1.ASN1Encodable
NoticeReference class, used in CertificatePolicies X509 V3 extensions (in policy qualifiers).
NoticeReference ::= SEQUENCE {
organization DisplayText,
noticeNumbers SEQUENCE OF INTEGER }

see
PolicyQualifierInfo
see
PolicyInformation

Fields Summary
DisplayText
organization
org.bouncycastle.asn1.ASN1Sequence
noticeNumbers
Constructors Summary
public NoticeReference(String orgName, Vector numbers)
Creates a new NoticeReference instance.

param
orgName a String value
param
numbers a Vector value

      organization = new DisplayText(orgName);

      Object o = numbers.elementAt(0);

      ASN1EncodableVector av = new ASN1EncodableVector();
      if (o instanceof Integer) {
         Enumeration it = numbers.elements();

         while (it.hasMoreElements()) {
            Integer nm = (Integer) it.nextElement();
               DERInteger di = new DERInteger(nm.intValue());
            av.add (di);
         }
      }

      noticeNumbers = new DERSequence(av);
   
public NoticeReference(String orgName, org.bouncycastle.asn1.ASN1Sequence numbers)
Creates a new NoticeReference instance.

param
orgName a String value
param
numbers an ASN1EncodableVector value

      organization = new DisplayText (orgName);
      noticeNumbers = numbers;
   
public NoticeReference(int displayTextType, String orgName, org.bouncycastle.asn1.ASN1Sequence numbers)
Creates a new NoticeReference instance.

param
displayTextType an int value
param
orgName a String value
param
numbers an ASN1EncodableVector value

      organization = new DisplayText(displayTextType, 
                                     orgName);
      noticeNumbers = numbers;
   
public NoticeReference(org.bouncycastle.asn1.ASN1Sequence as)
Creates a new NoticeReference instance.

Useful for reconstructing a NoticeReference instance from its encodable/encoded form.

param
as an ASN1Sequence value obtained from either calling @{link toASN1Object()} for a NoticeReference instance or from parsing it from a DER-encoded stream.

      organization = DisplayText.getInstance(as.getObjectAt(0));
      noticeNumbers = (ASN1Sequence) as.getObjectAt(1);
   
Methods Summary
public static org.bouncycastle.asn1.x509.NoticeReferencegetInstance(java.lang.Object as)

      if (as instanceof NoticeReference)
      {
          return (NoticeReference)as;
      }
      else if (as instanceof ASN1Sequence)
      {
          return new NoticeReference((ASN1Sequence)as);
      }

      throw new IllegalArgumentException("unknown object in getInstance.");
   
public org.bouncycastle.asn1.DERObjecttoASN1Object()
Describe toASN1Object method here.

return
a DERObject value

      ASN1EncodableVector av = new ASN1EncodableVector();
      av.add (organization);
      av.add (noticeNumbers);
      return new DERSequence (av);