Parcel.ReadSerializable Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ReadSerializable() |
Read and return a new Serializable object from the parcel. |
ReadSerializable(ClassLoader, Class) |
Same as |
ReadSerializable()
Read and return a new Serializable object from the parcel.
[Android.Runtime.Register("readSerializable", "()Ljava/io/Serializable;", "")]
public Java.IO.ISerializable? ReadSerializable ();
[<Android.Runtime.Register("readSerializable", "()Ljava/io/Serializable;", "")>]
member this.ReadSerializable : unit -> Java.IO.ISerializable
Returns
the Serializable object, or null if the Serializable name wasn't found in the parcel.
Unlike <code data-dev-comment-type="c">#readSerializable(ClassLoader, Class)</code>, it uses the nearest valid class loader
up the execution stack to instantiate the Serializable object.
- Attributes
Remarks
Read and return a new Serializable object from the parcel.
This member is deprecated. Use the type-safer version #readSerializable(ClassLoader, Class)
starting from Android Build.VERSION_CODES#TIRAMISU
.
Java documentation for android.os.Parcel.readSerializable()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
ReadSerializable(ClassLoader, Class)
Same as #readSerializable()
but accepts loader
and clazz
parameters.
[Android.Runtime.Register("readSerializable", "(Ljava/lang/ClassLoader;Ljava/lang/Class;)Ljava/lang/Object;", "", ApiSince=33)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public Java.Lang.Object? ReadSerializable (Java.Lang.ClassLoader? loader, Java.Lang.Class clazz);
[<Android.Runtime.Register("readSerializable", "(Ljava/lang/ClassLoader;Ljava/lang/Class;)Ljava/lang/Object;", "", ApiSince=33)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
member this.ReadSerializable : Java.Lang.ClassLoader * Java.Lang.Class -> Java.Lang.Object
Parameters
- loader
- ClassLoader
A ClassLoader from which to instantiate the Serializable object, or null for the default class loader.
- clazz
- Class
The type of the object expected.
Returns
- Attributes
Remarks
Same as #readSerializable()
but accepts loader
and clazz
parameters.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.