Exception: java.io.InvalidClassException
- public exception 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
Inheritance
Superclass tree:- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.io.IOException
- java.io.ObjectStreamException
- java.io.InvalidClassException
Methods
-
InvalidClassExceptiontop
public InvalidClassException(String reason)Report an InvalidClassException for the reason specified. -
InvalidClassExceptiontop
Constructs an InvalidClassException object. -
getMessagetop
public String getMessage()Produce the message and include the classname, if present.- Override hierarchy:
- getMessage from Throwable
Fields
-
classname
public String classnameName of the invalid class.
