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

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java 2 SDK SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策