JavaTM 2 Platform
Standard Ed. 6

javax.xml.crypto
類別 MarshalException

java.lang.Object
  繼承者 java.lang.Throwable
      繼承者 java.lang.Exception
          繼承者 javax.xml.crypto.MarshalException
所有已實作的介面:
Serializable

public class MarshalException
extends Exception

指示 XML 編組或解組過程中發生的異常條件。

MarshalException 可以包含一個 cause:另一個導致拋出此 MarshalException 的 throwable。

從以下版本開始:
1.6
另請參見:
XMLSignature.sign(XMLSignContext), XMLSignatureFactory.unmarshalXMLSignature(XMLValidateContext), 序列化表格

建構子摘要
MarshalException()
          建構使用 null 作為其詳細訊息的新 MarshalException
MarshalException(String message)
          建構帶指定詳細訊息的新 MarshalException
MarshalException(String message, Throwable cause)
          建構一個帶指定詳細訊息和 cause 的新 MarshalException
MarshalException(Throwable cause)
          建構帶指定 cause 和詳細訊息 (cause==null ? null :cause.toString())MarshalException(它通常包含 cause 的類別和詳細訊息)。
 
方法摘要
 Throwable getCause()
          返回此 MarshalException 的 cause;如果 cause 不存在或未知,則返回 null
 void printStackTrace()
          將此 MarshalException、它的追蹤 (backtrace) 和 cause 的追蹤列印到標準錯誤串流中。
 void printStackTrace(PrintStream s)
          將此 MarshalException、它的追蹤和 cause 的追蹤列印到指定的列印串流。
 void printStackTrace(PrintWriter s)
          將此 MarshalException、它的追蹤和 cause 的追蹤列印到指定的列印編寫器。
 
從類別 java.lang.Throwable 繼承的方法
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
從類別 java.lang.Object 繼承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

建構子詳細資訊

MarshalException

public MarshalException()
建構使用 null 作為其詳細訊息的新 MarshalException


MarshalException

public MarshalException(String message)
建構帶指定詳細訊息的新 MarshalException

參數:
message - 詳細訊息

MarshalException

public MarshalException(String message,
                        Throwable cause)
建構一個帶指定詳細訊息和 cause 的新 MarshalException

注意,與 cause 相關的詳細訊息不是自動合併到此異常的詳細訊息中的。

參數:
message - 詳細訊息
cause - cause(允許為 null 值,指示 cause 不存在或未知。)

MarshalException

public MarshalException(Throwable cause)
建構帶指定 cause 和詳細訊息 (cause==null ? null :cause.toString())MarshalException(它通常包含 cause 的類別和詳細訊息)。

參數:
cause - cause(允許為 null 值,指示 cause 不存在或未知。)
方法詳細資訊

getCause

public Throwable getCause()
返回此 MarshalException 的 cause;如果 cause 不存在或未知,則返回 null。(cause 是導致拋出此 MarshalException 的 throwable。)

覆寫:
類別 Throwable 中的 getCause
返回:
MarshalException 的 cause;如果 cause 不存在或未知,則返回 null

printStackTrace

public void printStackTrace()
將此 MarshalException、它的追蹤 (backtrace) 和 cause 的追蹤列印到標準錯誤串流中。

覆寫:
類別 Throwable 中的 printStackTrace

printStackTrace

public void printStackTrace(PrintStream s)
將此 MarshalException、它的追蹤和 cause 的追蹤列印到指定的列印串流。

覆寫:
類別 Throwable 中的 printStackTrace
參數:
s - 用於輸出的 PrintStream

printStackTrace

public void printStackTrace(PrintWriter s)
將此 MarshalException、它的追蹤和 cause 的追蹤列印到指定的列印編寫器。

覆寫:
類別 Throwable 中的 printStackTrace
參數:
s - 用於輸出的 PrintWriter

JavaTM 2 Platform
Standard Ed. 6

提交錯誤或意見

版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only