Parcel Parcel Class

Definition

Container for a message (data and object references) that can be sent through an IBinder.

[Android.Runtime.Register("android/os/Parcel", ApiSince=1, DoNotGenerateAcw=true)]
public sealed class Parcel : Java.Lang.Object
type Parcel = class
    inherit Object
Inheritance
Attributes

Remarks

Android platform documentation

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.

Properties

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
HasFileDescriptors HasFileDescriptors

Report whether the parcel contains any marshalled file descriptors.

IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
PeerReference PeerReference Inherited from Object
StringCreator StringCreator
ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

AppendFrom(Parcel, Int32, Int32) AppendFrom(Parcel, Int32, Int32)
Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
CreateBinderArray() CreateBinderArray()
CreateBinderArrayList() CreateBinderArrayList()

Android.OS.Parcel.writeBinderList(java.util.List android.os.IBinder )

CreateBooleanArray() CreateBooleanArray()
CreateByteArray() CreateByteArray()

Read and return a byte[] object from the parcel.

CreateCharArray() CreateCharArray()
CreateDoubleArray() CreateDoubleArray()
CreateFloatArray() CreateFloatArray()
CreateIntArray() CreateIntArray()
CreateLongArray() CreateLongArray()
CreateStringArray() CreateStringArray()
CreateStringArrayList() CreateStringArrayList()

Android.OS.Parcel.writeStringList(java.util.List java.lang.String )

CreateTypedArray(IParcelableCreator) CreateTypedArray(IParcelableCreator)
CreateTypedArrayList(IParcelableCreator) CreateTypedArrayList(IParcelableCreator)
DataAvail() DataAvail()

Returns the amount of data remaining to be read from the parcel.

DataCapacity() DataCapacity()

Returns the total amount of space in the parcel.

DataPosition() DataPosition()

Returns the current position in the parcel data.

DataSize() DataSize()

Returns the total amount of data contained in the parcel.

Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
EnforceInterface(String) EnforceInterface(String)
Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
Marshall() Marshall()

Returns the raw bytes of the parcel.

Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
Obtain() Obtain()

Retrieve a new Parcel object from the pool.

ReadArray(ClassLoader) ReadArray(ClassLoader)

Read and return a new Object array from the parcel at the current dataPosition().

ReadArrayList(ClassLoader) ReadArrayList(ClassLoader)

Read and return a new ArrayList object from the parcel at the current dataPosition().

ReadBinderArray(IBinder[]) ReadBinderArray(IBinder[])
ReadBinderList(IList<IBinder>) ReadBinderList(IList<IBinder>)
ReadBooleanArray(Boolean[]) ReadBooleanArray(Boolean[])
ReadBundle() ReadBundle()

Read and return a new Bundle object from the parcel at the current dataPosition().

ReadBundle(ClassLoader) ReadBundle(ClassLoader)

Read and return a new Bundle object from the parcel at the current dataPosition(), using the given class loader to initialize the class loader of the Bundle for later retrieval of Parcelable objects.

ReadByte() ReadByte()

Read a byte value from the parcel at the current dataPosition().

ReadByteArray(Byte[]) ReadByteArray(Byte[])

Read a byte[] object from the parcel and copy it into the given byte array.

ReadCharArray(Char[]) ReadCharArray(Char[])
ReadDouble() ReadDouble()

Read a double precision floating point value from the parcel at the current dataPosition().

ReadDoubleArray(Double[]) ReadDoubleArray(Double[])
ReadException() ReadException()

Special function for reading an exception result from the header of a parcel, to be used after receiving the result of a transaction.

ReadException(Int32, String) ReadException(Int32, String)

Throw an exception with the given message.

ReadFileDescriptor() ReadFileDescriptor()

Read a FileDescriptor from the parcel at the current dataPosition().

ReadFloat() ReadFloat()

Read a floating point value from the parcel at the current dataPosition().

ReadFloatArray(Single[]) ReadFloatArray(Single[])
ReadHashMap(ClassLoader) ReadHashMap(ClassLoader)

Please use ReadBundle(ClassLoader) instead (whose data must have been written with WriteBundle(Bundle).

ReadInt() ReadInt()

Read an integer value from the parcel at the current dataPosition().

ReadIntArray(Int32[]) ReadIntArray(Int32[])
ReadList(IList, ClassLoader) ReadList(IList, ClassLoader)

Read into an existing List object from the parcel at the current dataPosition(), using the given class loader to load any enclosed Parcelables.

ReadLong() ReadLong()

Read a long integer value from the parcel at the current dataPosition().

ReadLongArray(Int64[]) ReadLongArray(Int64[])
ReadMap(IDictionary, ClassLoader) ReadMap(IDictionary, ClassLoader)

Please use ReadBundle(ClassLoader) instead (whose data must have been written with WriteBundle(Bundle).

ReadParcelable(ClassLoader) ReadParcelable(ClassLoader)

Read and return a new Parcelable from the parcel.

ReadParcelableArray(ClassLoader) ReadParcelableArray(ClassLoader)

Read and return a new Parcelable array from the parcel.

ReadPersistableBundle() ReadPersistableBundle()

Read and return a new Bundle object from the parcel at the current dataPosition().

ReadPersistableBundle(ClassLoader) ReadPersistableBundle(ClassLoader)

Read and return a new Bundle object from the parcel at the current dataPosition(), using the given class loader to initialize the class loader of the Bundle for later retrieval of Parcelable objects.

ReadSerializable() ReadSerializable()

Read and return a new Serializable object from the parcel.

ReadSize() ReadSize()

Read a Size from the parcel at the current dataPosition().

ReadSizeF() ReadSizeF()

Read a SizeF from the parcel at the current dataPosition().

ReadSparseArray(ClassLoader) ReadSparseArray(ClassLoader)

Read and return a new SparseArray object from the parcel at the current dataPosition().

ReadSparseBooleanArray() ReadSparseBooleanArray()

Read and return a new SparseBooleanArray object from the parcel at the current dataPosition().

ReadString() ReadString()

Read a string value from the parcel at the current dataPosition().

ReadStringArray(String[]) ReadStringArray(String[])
ReadStringList(IList<String>) ReadStringList(IList<String>)
ReadStrongBinder() ReadStrongBinder()

Read an object from the parcel at the current dataPosition().

ReadTypedArray(Object[], IParcelableCreator) ReadTypedArray(Object[], IParcelableCreator)
ReadTypedList(IList, IParcelableCreator) ReadTypedList(IList, IParcelableCreator)
ReadTypedObject(IParcelableCreator) ReadTypedObject(IParcelableCreator)
ReadValue(ClassLoader) ReadValue(ClassLoader)

Read a typed object from a parcel.

Recycle() Recycle()

Put a Parcel object back into the pool.

SetDataCapacity(Int32) SetDataCapacity(Int32)

Change the capacity (current available space) of the parcel.

SetDataPosition(Int32) SetDataPosition(Int32)

Move the current read/write position in the parcel.

SetDataSize(Int32) SetDataSize(Int32)

Change the amount of data in the parcel.

SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() ToArray<T>() Inherited from Object
ToString() ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
Unmarshall(Byte[], Int32, Int32) Unmarshall(Byte[], Int32, Int32)

Set the bytes in data to be the raw bytes of this Parcel.

UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
WriteArray(Object[]) WriteArray(Object[])

Flatten an Object array into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteBinderArray(IBinder[]) WriteBinderArray(IBinder[])
WriteBinderList(IList<IBinder>) WriteBinderList(IList<IBinder>)
WriteBooleanArray(Boolean[]) WriteBooleanArray(Boolean[])
WriteBundle(Bundle) WriteBundle(Bundle)

Flatten a Bundle into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteByte(SByte) WriteByte(SByte)

Write a byte value into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteByteArray(Byte[]) WriteByteArray(Byte[])

Write a byte array into the parcel at the current DataPosition(), growing DataCapacity() if needed.

WriteByteArray(Byte[], Int32, Int32) WriteByteArray(Byte[], Int32, Int32)

Write a byte array into the parcel at the current DataPosition(), growing DataCapacity() if needed.

WriteCharArray(Char[]) WriteCharArray(Char[])
WriteDouble(Double) WriteDouble(Double)

Write a double precision floating point value into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteDoubleArray(Double[]) WriteDoubleArray(Double[])
WriteException(Exception) WriteException(Exception)

Special function for writing an exception result at the header of a parcel, to be used when returning an exception from a transaction.

WriteFileDescriptor(FileDescriptor) WriteFileDescriptor(FileDescriptor)

Write a FileDescriptor into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteFloat(Single) WriteFloat(Single)

Write a floating point value into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteFloatArray(Single[]) WriteFloatArray(Single[])
WriteInt(Int32) WriteInt(Int32)

Write an integer value into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteIntArray(Int32[]) WriteIntArray(Int32[])
WriteInterfaceToken(String) WriteInterfaceToken(String)

Store or read an IBinder interface token in the parcel at the current DataPosition().

WriteList(IList) WriteList(IList)

Flatten a List into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteLong(Int64) WriteLong(Int64)

Write a long integer value into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteLongArray(Int64[]) WriteLongArray(Int64[])
WriteMap(IDictionary) WriteMap(IDictionary)

Please use WriteBundle(Bundle) instead.

WriteNoException() WriteNoException()

Special function for writing information at the front of the Parcel indicating that no exception occurred.

WriteParcelable(IParcelable, ParcelableWriteFlags) WriteParcelable(IParcelable, ParcelableWriteFlags)

Flatten the name of the class of the Parcelable and its contents into the parcel.

WriteParcelableArray(Object[], ParcelableWriteFlags) WriteParcelableArray(Object[], ParcelableWriteFlags)
WritePersistableBundle(PersistableBundle) WritePersistableBundle(PersistableBundle)

Flatten a PersistableBundle into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteSerializable(ISerializable) WriteSerializable(ISerializable)

Write a generic serializable object in to a Parcel.

WriteSize(Size) WriteSize(Size)

Flatten a Size into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteSizeF(SizeF) WriteSizeF(SizeF)

Flatten a SizeF into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteSparseArray(SparseArray) WriteSparseArray(SparseArray)
WriteSparseBooleanArray(SparseBooleanArray) WriteSparseBooleanArray(SparseBooleanArray)
WriteString(String) WriteString(String)

Write a string value into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteStringArray(String[]) WriteStringArray(String[])
WriteStringList(IList<String>) WriteStringList(IList<String>)
WriteStrongBinder(IBinder) WriteStrongBinder(IBinder)

Write an object into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteStrongInterface(IInterface) WriteStrongInterface(IInterface)

Write an object into the parcel at the current dataPosition(), growing dataCapacity() if needed.

WriteTypedArray(Object[], ParcelableWriteFlags) WriteTypedArray(Object[], ParcelableWriteFlags)
WriteTypedList(IList) WriteTypedList(IList)
WriteTypedObject(Object, ParcelableWriteFlags) WriteTypedObject(Object, ParcelableWriteFlags)
WriteValue(Object) WriteValue(Object)

Flatten a generic object in to a parcel.

Explicit Interface Implementations

IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to