InvalidClassException  |  API reference  |  Android Developers (original) (raw)

open class InvalidClassException : ObjectStreamException

kotlin.Any
kotlin.Throwable
java.lang.Exception
java.io.IOException
java.io.ObjectStreamException

Thrown when the Serialization runtime detects one of the following problems with a Class.

Summary

Public constructors
InvalidClassException(reason: String!) Report an InvalidClassException for the reason specified.
InvalidClassException(cname: String!, reason: String!) Constructs an InvalidClassException object.
Properties
String! classname Name of the invalid class.
open String? message Produce the message and include the classname, if present.

Public constructors

InvalidClassException

InvalidClassException(reason: String!)

Report an InvalidClassException for the reason specified.

Parameters
reason String!: String describing the reason for the exception.

InvalidClassException

InvalidClassException(
    cname: String!,
    reason: String!)

Constructs an InvalidClassException object.

Parameters
cname String!: a String naming the invalid class.
reason String!: a String describing the reason for the exception.

Properties

classname

var classname: String!

Name of the invalid class.

message

open val message: String?

Produce the message and include the classname, if present.

Return
String? the detail message string of this Throwable instance (which may be null).

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2025-02-10 UTC.