Java android.os Parcel fields, constructors, methods, implement or subclass

Example usage for Java android.os Parcel fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.os Parcel.

The text is from its open source code.

Method

byte[]createByteArray()
Read and return a byte[] object from the parcel.
int[]createIntArray()
long[]createLongArray()
String[]createStringArray()
ArrayListcreateStringArrayList()
Read and return a new ArrayList containing String objects from the parcel that was written with #writeStringList at the current dataPosition().
T[]createTypedArray(Parcelable.Creator c)
Read and return a new array containing a particular object type from the parcel at the current dataPosition().
ArrayListcreateTypedArrayList(Parcelable.Creator c)
Read and return a new ArrayList containing a particular object type from the parcel that was written with #writeTypedList at the current dataPosition().
intdataPosition()
Returns the current position in the parcel data.
intdataSize()
Returns the total amount of data contained in the parcel.
byte[]marshall()
Returns the raw bytes of the parcel.
Parcelobtain()
Retrieve a new Parcel object from the pool.
booleanpushAllowFds(boolean allowFds)
ArrayListreadArrayList(ClassLoader loader)
Read and return a new ArrayList object from the parcel at the current dataPosition().
voidreadBooleanArray(boolean[] val)
BundlereadBundle()
Read and return a new Bundle object from the parcel at the current dataPosition().
BundlereadBundle(ClassLoader loader)
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.
bytereadByte()
Read a byte value from the parcel at the current dataPosition().
voidreadByteArray(byte[] val)
Read a byte[] object from the parcel and copy it into the given byte array.
doublereadDouble()
Read a double precision floating point value from the parcel at the current dataPosition().
voidreadException(int code, String msg)
Throw an exception with the given message.
ParcelFileDescriptorreadFileDescriptor()
Read a FileDescriptor from the parcel at the current dataPosition().
floatreadFloat()
Read a floating point value from the parcel at the current dataPosition().
HashMapreadHashMap(ClassLoader loader)
Please use #readBundle(ClassLoader) instead (whose data must have been written with #writeBundle .
intreadInt()
Read an integer value from the parcel at the current dataPosition().
voidreadIntArray(int[] val)
voidreadList(List outVal, ClassLoader loader)
Read into an existing List object from the parcel at the current dataPosition(), using the given class loader to load any enclosed Parcelables.
longreadLong()
Read a long integer value from the parcel at the current dataPosition().
voidreadMap(Map outVal, ClassLoader loader)
Please use #readBundle(ClassLoader) instead (whose data must have been written with #writeBundle .
TreadParcelable(ClassLoader loader)
Read and return a new Parcelable from the parcel.
Parcelable[]readParcelableArray(ClassLoader loader)
Read and return a new Parcelable array from the parcel.
SerializablereadSerializable()
Read and return a new Serializable object from the parcel.
SparseBooleanArrayreadSparseBooleanArray()
Read and return a new SparseBooleanArray object from the parcel at the current dataPosition().
StringreadString()
Read a string value from the parcel at the current dataPosition().
voidreadStringArray(String[] val)
voidreadStringList(List list)
Read into the given List items String objects that were written with #writeStringList at the current dataPosition().
IBinderreadStrongBinder()
Read an object from the parcel at the current dataPosition().
voidreadTypedArray(T[] val, Parcelable.Creator c)
voidreadTypedList(List list, Parcelable.Creator c)
Read into the given List items containing a particular object type that were written with #writeTypedList at the current dataPosition().
ObjectreadValue(ClassLoader loader)
Read a typed object from a parcel.
voidrecycle()
Put a Parcel object back into the pool.
voidrestoreAllowFds(boolean lastValue)
voidsetDataPosition(int pos)
Move the current read/write position in the parcel.
voidunmarshall(byte[] data, int offset, int length)
Set the bytes in data to be the raw bytes of this Parcel.
voidwriteBooleanArray(boolean[] val)
voidwriteBundle(Bundle val)
Flatten a Bundle into the parcel at the current dataPosition(), growing dataCapacity() if needed.
voidwriteByte(byte val)
Write a byte value into the parcel at the current dataPosition(), growing dataCapacity() if needed.
voidwriteByteArray(byte[] b)
Write a byte array into the parcel at the current #dataPosition , growing #dataCapacity if needed.
voidwriteDouble(double val)
Write a double precision floating point value into the parcel at the current dataPosition(), growing dataCapacity() if needed.
voidwriteException(Exception e)
Special function for writing an exception result at the header of a parcel, to be used when returning an exception from a transaction.
voidwriteFileDescriptor(FileDescriptor val)
Write a FileDescriptor into the parcel at the current dataPosition(), growing dataCapacity() if needed.
voidwriteFloat(float val)
Write a floating point value into the parcel at the current dataPosition(), growing dataCapacity() if needed.
voidwriteInt(int val)
Write an integer value into the parcel at the current dataPosition(), growing dataCapacity() if needed.
voidwriteIntArray(int[] val)
voidwriteList(List val)
Flatten a List into the parcel at the current dataPosition(), growing dataCapacity() if needed.
voidwriteLong(long val)
Write a long integer value into the parcel at the current dataPosition(), growing dataCapacity() if needed.
voidwriteLongArray(long[] val)
voidwriteMap(Map val)
Please use #writeBundle instead.
voidwriteParcelable(Parcelable p, int parcelableFlags)
Flatten the name of the class of the Parcelable and its contents into the parcel.
voidwriteParcelableArray(T[] value, int parcelableFlags)
Write a heterogeneous array of Parcelable objects into the Parcel.
voidwriteSerializable(Serializable s)
Write a generic serializable object in to a Parcel.
voidwriteSparseBooleanArray(SparseBooleanArray val)
voidwriteString(String val)
Write a string value into the parcel at the current dataPosition(), growing dataCapacity() if needed.
voidwriteStringArray(String[] val)
voidwriteStringList(List val)
Flatten a List containing String objects into the parcel, at the current dataPosition() and growing dataCapacity() if needed.
voidwriteStrongBinder(IBinder val)
Write an object into the parcel at the current dataPosition(), growing dataCapacity() if needed.
voidwriteStrongInterface(IInterface val)
Write an object into the parcel at the current dataPosition(), growing dataCapacity() if needed.
voidwriteTypedArray(T[] val, int parcelableFlags)
Flatten a homogeneous array containing a particular object type into the parcel, at the current dataPosition() and growing dataCapacity() if needed.
voidwriteTypedList(List val)
Flatten a List containing a particular object type into the parcel, at the current dataPosition() and growing dataCapacity() if needed.
voidwriteValue(Object v)
Flatten a generic object in to a parcel.