Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.io

Class InvalidClassException

java.lang.Object
|
+--java.lang.Throwable
   |
   +--java.lang.Exception
      |
      +--java.io.IOException
         |
         +--java.io.ObjectStreamException
            |
            +--java.io.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:Author:

Field Summary

java.lang.Stringclassname

The name of the class which encountered the error.

Constructor Summary

InvalidClassException(java.lang.String message)

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

Create an exception with a descriptive error message, and the name of the class that caused the problem.

Method Summary

java.lang.StringgetMessage()

Returns the descriptive error message for this exception.

Field Details

classname

public String classname

The name of the class which encountered the error.


Constructor Details

InvalidClassException

public InvalidClassException(java.lang.String message)

Create an exception with a descriptive error message, but a null classname.

Parameters:


InvalidClassException

public InvalidClassException(java.lang.String classname, java.lang.String message)

Create an exception with a descriptive error message, and the name of the class that caused the problem.

Parameters:


Method Details

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: