Stay organized with collections
Save and categorize content based on your preferences.
NotSerializableException
open class NotSerializableException : ObjectStreamException
Thrown when an instance is required to have a Serializable interface. The serialization runtime or the class of the instance can throw this exception. The argument should be the name of the class.
Summary
Public constructors |
Constructs a NotSerializableException object.
|
Constructs a NotSerializableException object with message string.
|
Public constructors
NotSerializableException
NotSerializableException()
Constructs a NotSerializableException object.
NotSerializableException
NotSerializableException(classname: String!)
Constructs a NotSerializableException object with message string.
Parameters |
classname |
String!: Class of the instance being serialized/deserialized. |
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# NotSerializableException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nNotSerializableException\n========================\n\n```\nopen class NotSerializableException : ObjectStreamException\n```\n\n|---|---|---|---|---|---------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||||||\n| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) |||||\n| | ↳ | [java.lang.Exception](../lang/Exception.html#) ||||\n| | | ↳ | [java.io.IOException](/reference/kotlin/java/io/IOException) |||\n| | | | ↳ | [java.io.ObjectStreamException](/reference/kotlin/java/io/ObjectStreamException) ||\n| | | | | ↳ | [java.io.NotSerializableException](#) |\n\nThrown when an instance is required to have a Serializable interface. The serialization runtime or the class of the instance can throw this exception. The argument should be the name of the class.\n\nSummary\n-------\n\n| Public constructors ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [NotSerializableException](#NotSerializableException())`()` Constructs a NotSerializableException object. |\n| [NotSerializableException](#NotSerializableException(kotlin.String))`(`classname:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Constructs a NotSerializableException object with message string. |\n\nPublic constructors\n-------------------\n\n### NotSerializableException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nNotSerializableException()\n```\n\nConstructs a NotSerializableException object. \n\n### NotSerializableException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nNotSerializableException(classname: String!)\n```\n\nConstructs a NotSerializableException object with message string.\n\n| Parameters ||\n|-------------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| `classname` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: Class of the instance being serialized/deserialized. |"]]