/** * Creates a new <code>UserNotice</code> instance. * * @param noticeRef a <code>NoticeReference</code> value * @param str the explicitText field as a String. */ public UserNotice( NoticeReference noticeRef, string str) { this.noticeRef = noticeRef; this.explicitText = new DisplayText(str); }
/** * Creates a new <code>UserNotice</code> instance. * * @param noticeRef a <code>NoticeReference</code> value * @param explicitText a <code>DisplayText</code> value */ public UserNotice( NoticeReference noticeRef, DisplayText explicitText) { this.noticeRef = noticeRef; this.explicitText = explicitText; }
/** * 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)); } } }