Exception: java.io.InvalidClassException

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
Authors:
@author unascribed
Since:
@since JDK1.1

Inheritance

Superclass tree: Implements:

Methods

  • InvalidClassExceptiontop

    public InvalidClassException(String reason)
    Report an InvalidClassException for the reason specified.
    Parameters:
    @param reason String describing the reason for the exception.
    Google Code Search
    Stack Overflow
  • InvalidClassExceptiontop

    public InvalidClassException(String cname, String reason)
    Constructs an InvalidClassException object.
    Parameters:
    @param cname a String naming the invalid class.
    @param reason a String describing the reason for the exception.
    Google Code Search
    Stack Overflow
  • getMessagetop

    public String getMessage()
    Produce the message and include the classname, if present.
    Return:
    @return the detail message string of this Throwable instance (which may be null).
    Override hierarchy:
    getMessage from Throwable
    Google Code Search
    Stack Overflow

Fields

  • classname

    public String classname
    Name of the invalid class.