|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.io.IOException
java.io.ObjectStreamException
java.io.WriteAbortedException
public class WriteAbortedException
在写入操作过程中抛出 ObjectStreamException 之一的信号。在写入操作过程中抛出 ObjectStreamExceptions 之一时,在读取操作过程中将抛出此异常。终止写入的异常可在详细信息字段中找到。该流被重置为初始状态,而且对已经反序列化的对象的所有引用都被丢弃。
从版本 1.4 开始,已对此异常作出改进,以符合通用异常链机制。在构造时提供并通过公共 detail 字段访问的“导致中止的异常”现在称为 cause,并可通过 Throwable.getCause() 方法以及前述的“遗留字段”访问。
| 字段摘要 | |
|---|---|
Exception |
detail
在写入 ObjectStream 时捕获的异常。 |
| 构造方法摘要 | |
|---|---|
WriteAbortedException(String s,
Exception ex)
使用描述该异常的字符串和导致中止的异常构造一个 WriteAbortedException。 |
|
| 方法摘要 | |
|---|---|
Throwable |
getCause()
返回终止操作的异常(即 cause)。 |
String |
getMessage()
生成此消息并包括嵌入异常的消息(如果有)。 |
| 从类 java.lang.Throwable 继承的方法 |
|---|
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 字段详细信息 |
|---|
public Exception detail
此字段早于通用异常链设施。Throwable.getCause() 方法现在是获得此信息的首选方法。
| 构造方法详细信息 |
|---|
public WriteAbortedException(String s,
Exception ex)
s - 描述该异常的字符串。ex - 导致中止的异常。| 方法详细信息 |
|---|
public String getMessage()
Throwable 中的 getMessagepublic Throwable getCause()
Throwable 中的 getCause
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。