|
JavaTM 2 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 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。