InvalidClassExceptionpublic class InvalidClassException extends ObjectStreamException Thrown when the Serialization runtime detects one of the following
problems with a Class.
- The serial version of the class does not match that of the class
descriptor read from the stream
- The class contains unknown datatypes
- The class does not have an accessible no-arg constructor
|
Fields Summary |
---|
private static final long | serialVersionUID | public String | classnameName of the invalid class. |
Constructors Summary |
---|
public InvalidClassException(String reason)Report an InvalidClassException for the reason specified.
super(reason);
| public InvalidClassException(String cname, String reason)Constructs an InvalidClassException object.
super(reason);
classname = cname;
|
Methods Summary |
---|
public java.lang.String | getMessage()Produce the message and include the classname, if present.
if (classname == null)
return super.getMessage();
else
return classname + "; " + super.getMessage();
|
|