java.io

Class InvalidClassException

public class InvalidClassException extends ObjectStreamException

This exception is thrown when there is some sort of problem with a class during a serialization operation. This could be:
.

The field classname will contain the name of the class that caused the problem if known. The getMessage() method for this exception will always include the name of that class if known.

Since: 1.1

UNKNOWN: updated to 1.4

Field Summary
Stringclassname
The name of the class which encountered the error.
Constructor Summary
InvalidClassException(String message)
Create an exception with a descriptive error message, but a null classname.
InvalidClassException(String classname, String message)
Create an exception with a descriptive error message, and the name of the class that caused the problem.
Method Summary
StringgetMessage()
Returns the descriptive error message for this exception.

Field Detail

classname

public String classname
The name of the class which encountered the error.

Serial: the classname causing the error

Constructor Detail

InvalidClassException

public InvalidClassException(String message)
Create an exception with a descriptive error message, but a null classname.

Parameters: message the descriptive error message

InvalidClassException

public InvalidClassException(String classname, String message)
Create an exception with a descriptive error message, and the name of the class that caused the problem.

Parameters: classname the name of the faulty class message the descriptive error message

Method Detail

getMessage

public String getMessage()
Returns the descriptive error message for this exception. It will include the class name that caused the problem if known, in the format: [classname][; ][super.getMessage()].

Returns: A descriptive error message, may be null