当前位置: 首页>>代码示例>>Java>>正文


Java DisplayText类代码示例

本文整理汇总了Java中org.bouncycastle.asn1.x509.DisplayText的典型用法代码示例。如果您正苦于以下问题:Java DisplayText类的具体用法?Java DisplayText怎么用?Java DisplayText使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DisplayText类属于org.bouncycastle.asn1.x509包,在下文中一共展示了DisplayText类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SPUserNotice

import org.bouncycastle.asn1.x509.DisplayText; //导入依赖的package包/类
private SPUserNotice(
    ASN1Sequence seq)
{
    Enumeration e = seq.getObjects();
    while (e.hasMoreElements())
    {
        ASN1Encodable object = (ASN1Encodable)e.nextElement();
        if (object instanceof DisplayText || object instanceof ASN1String)
        {
            explicitText = DisplayText.getInstance(object);
        }
        else if (object instanceof NoticeReference || object instanceof ASN1Sequence)
        {
            noticeRef = NoticeReference.getInstance(object);
        }
        else
        {
            throw new IllegalArgumentException("Invalid element in 'SPUserNotice': " + object.getClass().getName());
        }
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:22,代码来源:SPUserNotice.java

示例2: populate

import org.bouncycastle.asn1.x509.DisplayText; //导入依赖的package包/类
private void populate(UserNotice userNotice) {
	if (userNotice != null) {
		NoticeReference noticeReference = userNotice.getNoticeRef();

		if (noticeReference != null) {
			DisplayText organization = noticeReference.getOrganization();

			if (organization != null) {
				jtfOrganization.setText(organization.getString());
				jtfOrganization.setCaretPosition(0);
			}

			populateNoticeNumbers(noticeReference);
		}

		DisplayText explicitText = userNotice.getExplicitText();

		if (explicitText != null) {
			jtfExplicitText.setText(explicitText.getString());
			jtfExplicitText.setCaretPosition(0);
		}
	}
}
 
开发者ID:kaikramer,项目名称:keystore-explorer,代码行数:24,代码来源:DUserNoticeChooser.java

示例3: getExplicitText

import org.bouncycastle.asn1.x509.DisplayText; //导入依赖的package包/类
public DisplayText getExplicitText()
{
    return explicitText;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:SPUserNotice.java

示例4: toString

import org.bouncycastle.asn1.x509.DisplayText; //导入依赖的package包/类
/**
 * Get string representation of user notice.
 *
 * @param userNotice
 *            User notice
 * @return String representation of user notice
 */
public static String toString(UserNotice userNotice) {
	StringBuffer sbUserNotice = new StringBuffer();

	NoticeReference noticeReference = userNotice.getNoticeRef();

	if (noticeReference != null) {
		DisplayText organization = noticeReference.getOrganization();

		if (organization != null) {
			sbUserNotice.append(MessageFormat.format(res.getString("PolicyInformationUtil.Organization"),
					organization.getString()));

			if ((noticeReference.getNoticeNumbers() != null) || (userNotice.getExplicitText() != null)) {
				sbUserNotice.append(", ");
			}
		}

		ASN1Integer[] noticeNumbers = noticeReference.getNoticeNumbers();

		StringBuffer sbNoticeNumbers = new StringBuffer();

		if (noticeNumbers != null) {
			for (int i = 0; i < noticeNumbers.length; i++) {
				ASN1Integer noticeNumber = noticeNumbers[i];

				sbNoticeNumbers.append(noticeNumber.getValue().intValue());

				if ((i + 1) < noticeNumbers.length) {
					sbNoticeNumbers.append(" ");
				}
			}

			sbUserNotice.append(MessageFormat.format(res.getString("PolicyInformationUtil.NoticeNumbers"),
					sbNoticeNumbers.toString()));

			if (userNotice.getExplicitText() != null) {
				sbUserNotice.append(", ");
			}
		}
	}

	DisplayText explicitText = userNotice.getExplicitText();

	if (explicitText != null) {
		sbUserNotice.append(MessageFormat.format(res.getString("PolicyInformationUtil.ExplicitText"),
				explicitText.getString()));
	}

	return sbUserNotice.toString();
}
 
开发者ID:kaikramer,项目名称:keystore-explorer,代码行数:58,代码来源:PolicyInformationUtil.java


注:本文中的org.bouncycastle.asn1.x509.DisplayText类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。