public class InvalidClassException
extends ObjectStreamException
| java.lang.Object | |||||
| java.lang.Throwable | |||||
| java.lang.Exception | |||||
| java.io.IOException | |||||
| java.io.ObjectStreamException | |||||
| java.io.InvalidClassException | |||||
序列化运行时检测到某个类遇到以下问题之一时引发。
Fields |
|
|---|---|
public String |
classname 无效班级的名称。 |
Public constructors |
|
|---|---|
InvalidClassException(String reason) 根据指定的原因报告InvalidClassException。 |
|
InvalidClassException(String cname, String reason) 构造一个InvalidClassException对象。 |
|
公共方法(Public methods) |
|
|---|---|
String |
getMessage() 产生消息并包含类名(如果存在)。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Throwable
|
|
java.lang.Object
|
|
InvalidClassException (String reason)
根据指定的原因报告InvalidClassException。
| 参数(Parameters) | |
|---|---|
reason |
String: String describing the reason for the exception. |
InvalidClassException (String cname, String reason)
构造一个InvalidClassException对象。
| 参数(Parameters) | |
|---|---|
cname |
String: a String naming the invalid class. |
reason |
String: a String describing the reason for the exception. |
String getMessage ()
产生消息并包含类名(如果存在)。
| 返回(Returns) | |
|---|---|
String |
the detail message string of this Throwable instance (which may be null). |