Skip to content

Most visited

Recently visited

navigation
Added in API level 1

InvalidClassException

public class InvalidClassException
extends ObjectStreamException

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


Signals a problem during the serialization or or deserialization of an object. Possible reasons include:

See also:

Summary

Fields

public String classname

The fully qualified name of the class that caused the problem.

Public constructors

InvalidClassException(String detailMessage)

Constructs a new InvalidClassException with its stack trace and detailed message filled in.

InvalidClassException(String className, String detailMessage)

Constructs a new InvalidClassException with its stack trace, detail message and the fully qualified name of the class which caused the exception filled in.

Public methods

String getMessage()

Returns the detail message which was provided when the exception was created.

Inherited methods

From class java.lang.Throwable
From class java.lang.Object

Fields

classname

Added in API level 1
String classname

The fully qualified name of the class that caused the problem.

Public constructors

InvalidClassException

Added in API level 1
InvalidClassException (String detailMessage)

Constructs a new InvalidClassException with its stack trace and detailed message filled in.

Parameters
detailMessage String: the detail message for this exception.

InvalidClassException

Added in API level 1
InvalidClassException (String className, 
                String detailMessage)

Constructs a new InvalidClassException with its stack trace, detail message and the fully qualified name of the class which caused the exception filled in.

Parameters
className String: the name of the class that caused the exception.
detailMessage String: the detail message for this exception.

Public methods

getMessage

Added in API level 1
String getMessage ()

Returns the detail message which was provided when the exception was created. null is returned if no message was provided at creation time. If a detail message as well as a class name are provided, then the values are concatenated and returned.

Returns
String the detail message, possibly concatenated with the name of the class that caused the problem.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.