Example usage for Java android.os Parcel fields, constructors, methods, implement or subclass
The text is from its open source code.
byte[] | createByteArray() Read and return a byte[] object from the parcel. |
int[] | createIntArray() |
long[] | createLongArray() |
String[] | createStringArray() |
ArrayList | createStringArrayList() 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 Read and return a new array containing a particular object type from the parcel at the current dataPosition(). |
ArrayList | createTypedArrayList(Parcelable.Creator Read and return a new ArrayList containing a particular object type from the parcel that was written with #writeTypedList at the current dataPosition(). |
int | dataPosition() Returns the current position in the parcel data. |
int | dataSize() Returns the total amount of data contained in the parcel. |
byte[] | marshall() Returns the raw bytes of the parcel. |
Parcel | obtain() Retrieve a new Parcel object from the pool. |
boolean | pushAllowFds(boolean allowFds) |
ArrayList | readArrayList(ClassLoader loader) Read and return a new ArrayList object from the parcel at the current dataPosition(). |
void | readBooleanArray(boolean[] val) |
Bundle | readBundle() Read and return a new Bundle object from the parcel at the current dataPosition(). |
Bundle | readBundle(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. |
byte | readByte() Read a byte value from the parcel at the current dataPosition(). |
void | readByteArray(byte[] val) Read a byte[] object from the parcel and copy it into the given byte array. |
double | readDouble() Read a double precision floating point value from the parcel at the current dataPosition(). |
void | readException(int code, String msg) Throw an exception with the given message. |
ParcelFileDescriptor | readFileDescriptor() Read a FileDescriptor from the parcel at the current dataPosition(). |
float | readFloat() Read a floating point value from the parcel at the current dataPosition(). |
HashMap | readHashMap(ClassLoader loader) Please use #readBundle(ClassLoader) instead (whose data must have been written with #writeBundle . |
int | readInt() Read an integer value from the parcel at the current dataPosition(). |
void | readIntArray(int[] val) |
void | readList(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. |
long | readLong() Read a long integer value from the parcel at the current dataPosition(). |
void | readMap(Map outVal, ClassLoader loader) Please use #readBundle(ClassLoader) instead (whose data must have been written with #writeBundle . |
T | readParcelable(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. |
Serializable | readSerializable() Read and return a new Serializable object from the parcel. |
SparseBooleanArray | readSparseBooleanArray() Read and return a new SparseBooleanArray object from the parcel at the current dataPosition(). |
String | readString() Read a string value from the parcel at the current dataPosition(). |
void | readStringArray(String[] val) |
void | readStringList(List Read into the given List items String objects that were written with #writeStringList at the current dataPosition(). |
IBinder | readStrongBinder() Read an object from the parcel at the current dataPosition(). |
void | readTypedArray(T[] val, Parcelable.Creator |
void | readTypedList(List Read into the given List items containing a particular object type that were written with #writeTypedList at the current dataPosition(). |
Object | readValue(ClassLoader loader) Read a typed object from a parcel. |
void | recycle() Put a Parcel object back into the pool. |
void | restoreAllowFds(boolean lastValue) |
void | setDataPosition(int pos) Move the current read/write position in the parcel. |
void | unmarshall(byte[] data, int offset, int length) Set the bytes in data to be the raw bytes of this Parcel. |
void | writeBooleanArray(boolean[] val) |
void | writeBundle(Bundle val) Flatten a Bundle into the parcel at the current dataPosition(), growing dataCapacity() if needed. |
void | writeByte(byte val) Write a byte value into the parcel at the current dataPosition(), growing dataCapacity() if needed. |
void | writeByteArray(byte[] b) Write a byte array into the parcel at the current #dataPosition , growing #dataCapacity if needed. |
void | writeDouble(double val) Write a double precision floating point value into the parcel at the current dataPosition(), growing dataCapacity() if needed. |
void | writeException(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. |
void | writeFileDescriptor(FileDescriptor val) Write a FileDescriptor into the parcel at the current dataPosition(), growing dataCapacity() if needed. |
void | writeFloat(float val) Write a floating point value into the parcel at the current dataPosition(), growing dataCapacity() if needed. |
void | writeInt(int val) Write an integer value into the parcel at the current dataPosition(), growing dataCapacity() if needed. |
void | writeIntArray(int[] val) |
void | writeList(List val) Flatten a List into the parcel at the current dataPosition(), growing dataCapacity() if needed. |
void | writeLong(long val) Write a long integer value into the parcel at the current dataPosition(), growing dataCapacity() if needed. |
void | writeLongArray(long[] val) |
void | writeMap(Map val) Please use #writeBundle instead. |
void | writeParcelable(Parcelable p, int parcelableFlags) Flatten the name of the class of the Parcelable and its contents into the parcel. |
void | writeParcelableArray(T[] value, int parcelableFlags) Write a heterogeneous array of Parcelable objects into the Parcel. |
void | writeSerializable(Serializable s) Write a generic serializable object in to a Parcel. |
void | writeSparseBooleanArray(SparseBooleanArray val) |
void | writeString(String val) Write a string value into the parcel at the current dataPosition(), growing dataCapacity() if needed. |
void | writeStringArray(String[] val) |
void | writeStringList(List Flatten a List containing String objects into the parcel, at the current dataPosition() and growing dataCapacity() if needed. |
void | writeStrongBinder(IBinder val) Write an object into the parcel at the current dataPosition(), growing dataCapacity() if needed. |
void | writeStrongInterface(IInterface val) Write an object into the parcel at the current dataPosition(), growing dataCapacity() if needed. |
void | writeTypedArray(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. |
void | writeTypedList(List Flatten a List containing a particular object type into the parcel, at the current dataPosition() and growing dataCapacity() if needed. |
void | writeValue(Object v) Flatten a generic object in to a parcel. |