Serializable
public class InvalidClassException extends ObjectStreamException
Modifier and Type | Field | Description |
---|---|---|
String |
classname |
Name of the invalid class. |
Constructor | Description |
---|---|
InvalidClassException |
Report an InvalidClassException for the reason specified. |
InvalidClassException |
Constructs an InvalidClassException object. |
InvalidClassException |
Report an InvalidClassException for the reason and cause specified. |
InvalidClassException |
Report an InvalidClassException for the reason and cause specified. |
Modifier and Type | Method | Description |
---|---|---|
String |
getMessage() |
Produce the message and include the classname, if present. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public String classname
public InvalidClassException(String reason)
reason
- String describing the reason for the exception.public InvalidClassException(String cname, String reason)
cname
- a String naming the invalid class.reason
- a String describing the reason for the exception.public InvalidClassException(String reason, Throwable cause)
reason
- String describing the reason for the exception.cause
- the causepublic InvalidClassException(String cname, String reason, Throwable cause)
cname
- a String naming the invalid class.reason
- String describing the reason for the exception.cause
- the causepublic String getMessage()
getMessage
in class Throwable
Throwable
instance (which may be null
).
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/InvalidClassException.html