Exemplo n.º 1
0
 /**
  * Creates a new <code>UserNotice</code> instance.
  * <p>Useful from reconstructing a <code>UserNotice</code> instance
  * from its encodable/encoded form.
  *
  * @param as an <code>ASN1Sequence</code> value obtained from either
  * calling @{link toASN1Object()} for a <code>UserNotice</code>
  * instance or from parsing it from a DER-encoded stream.
  */
 public UserNotice(
     ASN1Sequence aseq)
 {
     if (aseq.size() == 2)
     {
         noticeRef    = NoticeReference.getInstance(aseq.getObjectAt(0));
         explicitText = DisplayText.getInstance(aseq.getObjectAt(1));
     }
     else if (aseq.size() == 1)
     {
         if (aseq.getObjectAt(0).toASN1Object() is ASN1Sequence)
         {
             noticeRef = NoticeReference.getInstance(aseq.getObjectAt(0));
         }
         else
         {
             explicitText = DisplayText.getInstance(aseq.getObjectAt(0));
         }
     }
 }
Exemplo n.º 2
0
 /**
  * Creates a new <code>NoticeReference</code> instance.
  * <p>Useful for reconstructing a <code>NoticeReference</code>
  * instance from its encodable/encoded form.
  *
  * @param as an <code>ASN1Sequence</code> value obtained from either
  * calling @{link toASN1Object()} for a <code>NoticeReference</code>
  * instance or from parsing it from a DER-encoded stream.
  */
 public NoticeReference(ASN1Sequence aseq)
 {
     organization  = DisplayText.getInstance(aseq.getObjectAt(0));
     noticeNumbers = (ASN1Sequence)aseq.getObjectAt(1);
 }