java.io
Class InvalidClassException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.io.IOException
              extended byjava.io.ObjectStreamException
                  extended byjava.io.InvalidClassException
All Implemented Interfaces:
Serializable

public class InvalidClassException
extends ObjectStreamException

A problem was found with the class of one of the objects being serialized or deserialized. These can be

See Also:
#readObject(), ObjectInputValidation#validateObject(), Serialized Form

Field Summary
 java.lang.String classname
          The fully qualified name of the class that caused the problem
 
Constructor Summary
InvalidClassException(java.lang.String detailMessage)
          Constructs a new instance of this class with its walkback and message filled in.
InvalidClassException(java.lang.String className, java.lang.String detailMessage)
          Constructs a new instance of this class with its walkback, message and the fully qualified name of the class which caused the exception filled in.
 
Method Summary
 java.lang.String getMessage()
          Answers the extra information message which was provided when the exception was created.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

classname

public java.lang.String classname
The fully qualified name of the class that caused the problem

Constructor Detail

InvalidClassException

public InvalidClassException(java.lang.String detailMessage)
Constructs a new instance of this class with its walkback and message filled in.

Parameters:
detailMessage - The detail message for the exception.

InvalidClassException

public InvalidClassException(java.lang.String className,
                             java.lang.String detailMessage)
Constructs a new instance of this class with its walkback, message and the fully qualified name of the class which caused the exception filled in.

Parameters:
className - The detail message for the exception.
detailMessage - The detail message for the exception.
Method Detail

getMessage

public java.lang.String getMessage()
Answers the extra information message which was provided when the exception was created. If no message was provided at creation time, then answer null. If a message was provided and a class name which caused the exception, the values are concatenated and returned.

Overrides:
getMessage in class Throwable
Returns:
The receiver's message, possibly concatenated with the name of the class that caused the problem.