Android
java.io
public class

java.io.InvalidClassException

java.lang.Object
java.lang.Throwable Serializable
java.lang.Exception
java.io.IOException
java.io.ObjectStreamException
java.io.InvalidClassException

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

  • The SUIDs of the class loaded by the VM and the serialized class info do not match
  • A serializable or externalizable object cannot be instantiated (when deserializing) because the empty constructor that needs to be run is not visible or fails.

Summary

Fields

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

Public Constructors

            InvalidClassException(String detailMessage)
Constructs a new instance of this class with its walkback and message filled in.
            InvalidClassException(String className, 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.

Public Methods

          String  getMessage()
Returns the extra information message which was provided when the exception was created.
Methods inherited from class java.lang.Throwable
Methods inherited from class java.lang.Object

Details

Fields

public String classname

The fully qualified name of the class that caused the problem

Public Constructors

public InvalidClassException(String detailMessage)

Constructs a new instance of this class with its walkback and message filled in.

Parameters

detailMessage The detail message for the exception.

public InvalidClassException(String className, 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.

Public Methods

public String getMessage()

Returns 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.

Returns

  • The receiver's message, possibly concatenated with the name of the class that caused the problem.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56