Top Description Fields Constructors Methods
java.io

public Class InvalidClassException

extends ObjectStreamException
Class Inheritance

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

Field Summary

Modifier and TypeField and Description
public String
classname

Name of the invalid class.

private static final long

Constructor Summary

AccessConstructor and Description
public
InvalidClassException(String
String describing the reason for the exception.
reason
)

Report an InvalidClassException for the reason specified.

public
InvalidClassException(String
a String naming the invalid class.
cname
,
String
a String describing the reason for the exception.
reason
)

Constructs an InvalidClassException object.

public
InvalidClassException(String
String describing the reason for the exception.
reason
,
Throwable
the cause
cause
)

Report an InvalidClassException for the reason and cause specified.

public
InvalidClassException(String
a String naming the invalid class.
cname
,
String
String describing the reason for the exception.
reason
,
Throwable
the cause
cause
)

Report an InvalidClassException for the reason and cause specified.

Method Summary

Modifier and TypeMethod and Description
public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Produce the message and include the classname, if present.

Field Detail

classnameback to summary
public String classname

Name of the invalid class.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.io.ObjectStreamException.serialVersionUID.

Annotations
@Serial

Constructor Detail

InvalidClassExceptionback to summary
public InvalidClassException(String reason)

Report an InvalidClassException for the reason specified.

Parameters
reason:String

String describing the reason for the exception.

InvalidClassExceptionback to summary
public InvalidClassException(String cname, String reason)

Constructs an InvalidClassException object.

Parameters
cname:String

a String naming the invalid class.

reason:String

a String describing the reason for the exception.

InvalidClassExceptionback to summary
public InvalidClassException(String reason, Throwable cause)

Report an InvalidClassException for the reason and cause specified.

Parameters
reason:String

String describing the reason for the exception.

cause:Throwable

the cause

Since
19
InvalidClassExceptionback to summary
public InvalidClassException(String cname, String reason, Throwable cause)

Report an InvalidClassException for the reason and cause specified.

Parameters
cname:String

a String naming the invalid class.

reason:String

String describing the reason for the exception.

cause:Throwable

the cause

Since
19

Method Detail

getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Produce the message and include the classname, if present.

Returns:String

Doc from java.lang.Throwable.getMessage.

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

Annotations
@Override