- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- javax.xml.crypto.MarshalException
-
- All Implemented Interfaces:
-
Serializable
public class MarshalException extends 异常
表示在XML编组或解组过程中发生的异常情况。A
MarshalException可能包含一个原因:另一个可抛出的,导致这个MarshalException被抛出。
-
-
构造方法摘要
构造方法 Constructor 描述 MarshalException()构建新的MarshalException,其详细信息为null。MarshalException(String message)构造一个新的MarshalException具有指定的详细消息。MarshalException(String message, Throwable cause)构造一个新的MarshalException具有指定的详细信息和原因。MarshalException(Throwable cause)构造一个新的MarshalException与指定的原因和详细消息(cause==null ? null : cause.toString())(它通常包含的类和详细消息cause)。
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 ThrowablegetCause()如果原因不存在或未知,则返回MarshalException或null的原因。voidprintStackTrace()打印MarshalException,其回溯和原因回溯到标准错误流。voidprintStackTrace(PrintStream s)打印MarshalException,其回溯和原因回溯到指定的打印流。voidprintStackTrace(PrintWriter s)打印MarshalException,其回溯和原因回溯到指定的打印作者。-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
-
-
-
构造方法详细信息
-
MarshalException
public MarshalException()
构造一个新的MarshalException作为其详细信息,其中null。
-
MarshalException
public MarshalException(String message)
构造一个新的MarshalException与指定的详细消息。- 参数
-
message- 详细信息
-
MarshalException
public MarshalException(String message, Throwable cause)
构造一个新的MarshalException与指定的详细信息和原因。请注意,与
cause相关联的详细信息不会自动并入此异常的详细消息。- 参数
-
message- 详细信息 -
cause- 原因(允许使用Anull值,表示原因不存在或未知)。
-
MarshalException
public MarshalException(Throwable cause)
构造一个新的MarshalException与指定的原因和详细消息(cause==null ? null : cause.toString())(它通常包含的类和详细消息cause)。- 参数
-
cause- 原因(允许使用Anull值,表示原因不存在或未知)。
-
-
方法详细信息
-
getCause
public Throwable getCause()
如果原因不存在或未知,则返回MarshalException或null的原因。 (原因是引起这个MarshalException抛弃)
-
printStackTrace
public void printStackTrace()
打印MarshalException,其回溯和原因回溯到标准错误流。- 重写:
-
printStackTrace在Throwable
-
printStackTrace
public void printStackTrace(PrintStream s)
打印MarshalException,其回溯和原因回溯到指定的打印流。- 重写:
-
printStackTrace中的Throwable - 参数
-
s-PrintStream用于输出
-
printStackTrace
public void printStackTrace(PrintWriter s)
打印MarshalException,其追溯和原因的回溯到指定的打印作者。- 重写:
-
printStackTrace在Throwable - 参数
-
s-PrintWriterto use for output
-
-