本文整理汇总了Java中sun.security.provider.X509Factory.intern方法的典型用法代码示例。如果您正苦于以下问题:Java X509Factory.intern方法的具体用法?Java X509Factory.intern怎么用?Java X509Factory.intern使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.security.provider.X509Factory
的用法示例。
在下文中一共展示了X509Factory.intern方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toImpl
import sun.security.provider.X509Factory; //导入方法依赖的package包/类
/**
* Utility method to convert an arbitrary instance of X509Certificate
* to a X509CertImpl. Does a cast if possible, otherwise reparses
* the encoding.
*/
public static X509CertImpl toImpl(X509Certificate cert)
throws CertificateException {
if (cert instanceof X509CertImpl) {
return (X509CertImpl)cert;
} else {
return X509Factory.intern(cert);
}
}
示例2: toImpl
import sun.security.provider.X509Factory; //导入方法依赖的package包/类
/**
* Utility method to convert an arbitrary instance of X509CRL
* to a X509CRLImpl. Does a cast if possible, otherwise reparses
* the encoding.
*/
public static X509CRLImpl toImpl(X509CRL crl)
throws CRLException {
if (crl instanceof X509CRLImpl) {
return (X509CRLImpl)crl;
} else {
return X509Factory.intern(crl);
}
}