|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.security.GeneralSecurityException
java.security.cert.CertPathValidatorException
public class CertPathValidatorException
指示在验证一个证书路径时遇到了某种问题的异常。
CertPathValidatorException 提供了对包装异常的支持。getCause 方法返回导致此异常抛出的 throwable(如果有的话)。
CertPathValidatorException 可能还包括异常抛出时所验证的证书路径,以及导致该异常抛出的证书在证书路径中的索引。使用 getCertPath 和 getIndex 方法可获取此信息。
并发访问
除非另行指定,否则此类中所定义的方法不是线程安全的。需要并发访问单个对象的多个线程应该在它们之间实现同步并提供所需的锁定。对于每个线程都操作一个不同对象的多个线程而言,无需实现同步。
CertPathValidator,
序列化表格| 构造方法摘要 | |
|---|---|
CertPathValidatorException()
创建不带详细消息的 CertPathValidatorException。 |
|
CertPathValidatorException(String msg)
创建带给定详细消息的 CertPathValidatorException。 |
|
CertPathValidatorException(String msg,
Throwable cause)
创建带指定详细消息和 cause 的 CertPathValidatorException。 |
|
CertPathValidatorException(String msg,
Throwable cause,
CertPath certPath,
int index)
创建带指定详细消息、cause、证书路径和索引的 CertPathValidatorException。 |
|
CertPathValidatorException(Throwable cause)
创建包装指定 throwable 的 CertPathValidatorException。 |
|
| 方法摘要 | |
|---|---|
CertPath |
getCertPath()
返回抛出异常时正在验证的证书路径 |
int |
getIndex()
返回导致该异常抛出的证书在证书路径中的索引。 |
| 从类 java.lang.Throwable 继承的方法 |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
public CertPathValidatorException()
CertPathValidatorException。
public CertPathValidatorException(String msg)
CertPathValidatorException。详细消息是描述此特定异常的 String。
msg - 详细消息public CertPathValidatorException(Throwable cause)
CertPathValidatorException。这就允许将任何异常转换成 CertPathValidatorException,同时保留有关已包装异常的信息,而这些信息可能对调试很有用。将详细消息设置为:(cause==null ? null :cause.toString())(它通常包含 cause 的类和详细消息)。
cause - cause(保存此 cause,以便以后通过 getCause() 方法获取它)。(允许使用 null 值,并指出 cause 是不存在的或是未知的。)
public CertPathValidatorException(String msg,
Throwable cause)
CertPathValidatorException。
msg - 详细消息cause - cause(保存此 cause,以便以后通过 getCause() 方法获取它)。(允许使用 null 值,并指出 cause 是不存在的或是未知的。)
public CertPathValidatorException(String msg,
Throwable cause,
CertPath certPath,
int index)
CertPathValidatorException。
msg - 详细消息(如果没有则为 null)cause - cause(如果没有则为 null)certPath - 遇到错误时正在验证的证书路径index - 导致错误的证书在证书路径中的索引(如果不适用,则为 -1)。注意,CertPath 中的证书列表是基于零的。
IndexOutOfBoundsException - 如果 index 超出范围 (index < -1 || (certPath != null && index >= certPath.getCertificates().size())
IllegalArgumentException - 如果 certPath 为 null 并且 index 不是 -1| 方法详细信息 |
|---|
public CertPath getCertPath()
CertPath(如果未指定则返回 null)public int getIndex()
CertPath 中的证书列表是基于零的。如果尚未设置索引,则返回 -1。
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。