/**@class android.os.Parcel @extends java.lang.Object Container for a message (data and object references) that can be sent through an IBinder. A Parcel can contain both flattened data that will be unflattened on the other side of the IPC (using the various methods here for writing specific types, or the general {@link android.os.Parcelable} interface), and references to live {@link android.os.IBinder} objects that will result in the other side receiving a proxy IBinder connected with the original IBinder in the Parcel. <p class="note">Parcel is <strong>not</strong> a general-purpose serialization mechanism. This class (and the corresponding {@link android.os.Parcelable} API for placing arbitrary objects into a Parcel) is designed as a high-performance IPC transport. As such, it is not appropriate to place any Parcel data in to persistent storage: changes in the underlying implementation of any of the data in the Parcel can render older data unreadable.</p> <p>The bulk of the Parcel API revolves around reading and writing data of various types. There are six major classes of such functions available.</p> <h3>Primitives</h3> <p>The most basic data functions are for writing and reading primitive data types: {@link #writeByte}, {@link #readByte}, {@link #writeDouble}, {@link #readDouble}, {@link #writeFloat}, {@link #readFloat}, {@link #writeInt}, {@link #readInt}, {@link #writeLong}, {@link #readLong}, {@link #writeString}, {@link #readString}. Most other data operations are built on top of these. The given data is written and read using the endianess of the host CPU.</p> <h3>Primitive Arrays</h3> <p>There are a variety of methods for reading and writing raw arrays of primitive objects, which generally result in writing a 4-byte length followed by the primitive data items. The methods for reading can either read the data into an existing array, or create and return a new array. These available types are:</p> <ul> <li> {@link #writeBooleanArray(boolean[])}, {@link #readBooleanArray(boolean[])}, {@link #createBooleanArray}() <li> {@link #writeByteArray(byte[])}, {@link #writeByteArray(byte[], int, int)}, {@link #readByteArray(byte[])}, {@link #createByteArray}() <li> {@link #writeCharArray(char[])}, {@link #readCharArray(char[])}, {@link #createCharArray}() <li> {@link #writeDoubleArray(double[])}, {@link #readDoubleArray(double[])}, {@link #createDoubleArray}() <li> {@link #writeFloatArray(float[])}, {@link #readFloatArray(float[])}, {@link #createFloatArray}() <li> {@link #writeIntArray(int[])}, {@link #readIntArray(int[])}, {@link #createIntArray}() <li> {@link #writeLongArray(long[])}, {@link #readLongArray(long[])}, {@link #createLongArray}() <li> {@link #writeStringArray(String[])}, {@link #readStringArray(String[])}, {@link #createStringArray}(). <li> {@link #writeSparseBooleanArray}(SparseBooleanArray), {@link #readSparseBooleanArray}(). </ul> <h3>Parcelables</h3> <p>The {@link android.os.Parcelable} protocol provides an extremely efficient (but low-level) protocol for objects to write and read themselves from Parcels. You can use the direct methods {@link #writeParcelable(Parcelable, int)} and {@link #readParcelable}(ClassLoader) or {@link #writeParcelableArray} and {@link #readParcelableArray}(ClassLoader) to write or read. These methods write both the class type and its data to the Parcel, allowing that class to be reconstructed from the appropriate class loader when later reading.</p> <p>There are also some methods that provide a more efficient way to work with Parcelables: {@link #writeTypedObject}, {@link #writeTypedArray}, {@link #writeTypedList}, {@link #readTypedObject}, {@link #createTypedArray} and {@link #createTypedArrayList}. These methods do not write the class information of the original object: instead, the caller of the read function must know what type to expect and pass in the appropriate {@link android.os.Parcelable.Creator android.os.Parcelable.Creator} instead to properly construct the new object and read its data. (To more efficient write and read a single Parcelable object that is not null, you can directly call {@link android.os.Parcelable#writeToandroid.os.Parcel android.os.Parcelable.writeToandroid.os.Parcel} and {@link android.os.Parcelable.Creator#createFromandroid.os.Parcel android.os.Parcelable.Creator.createFromandroid.os.Parcel} yourself.)</p> <h3>Bundles</h3> <p>A special type-safe container, called {@link android.os.Bundle}, is available for key/value maps of heterogeneous values. This has many optimizations for improved performance when reading and writing data, and its type-safe API avoids difficult to debug type errors when finally marshalling the data contents into a Parcel. The methods to use are {@link #writeBundle}(Bundle), {@link #readBundle}(), and {@link #readBundle}(ClassLoader). <h3>Active Objects</h3> <p>An unusual feature of Parcel is the ability to read and write active objects. For these objects the actual contents of the object is not written, rather a special token referencing the object is written. When reading the object back from the Parcel, you do not get a new instance of the object, but rather a handle that operates on the exact same object that was originally written. There are two forms of active objects available.</p> <p>{@link android.os.Binder} objects are a core facility of Android's general cross-process communication system. The {@link android.os.IBinder} interface describes an abstract protocol with a Binder object. Any such interface can be written in to a Parcel, and upon reading you will receive either the original object implementing that interface or a special proxy implementation that communicates calls back to the original object. The methods to use are {@link #writeStrongBinder}(IBinder), {@link #writeStrongInterface}(IInterface), {@link #readStrongBinder}(), {@link #writeBinderArray(IBinder[])}, {@link #readBinderArray(IBinder[])}, {@link #createBinderArray}(), {@link #writeBinderList}(List), {@link #readBinderList}(List), {@link #createBinderArrayList}().</p> <p>FileDescriptor objects, representing raw Linux file descriptor identifiers, can be written and {@link android.os.ParcelFileDescriptor} objects returned to operate on the original file descriptor. The returned file descriptor is a dup of the original file descriptor: the object and fd is different, but operating on the same underlying file stream, with the same position, etc. The methods to use are {@link #writeFileDescriptor}(FileDescriptor), {@link #readFileDescriptor}(). <h3>Untyped Containers</h3> <p>A final class of methods are for writing and reading standard Java containers of arbitrary types. These all revolve around the {@link #writeValue}(Object) and {@link #readValue}(ClassLoader) methods which define the types of objects allowed. The container methods are {@link #writeArray(Object[])}, {@link #readArray}(ClassLoader), {@link #writeList}(List), {@link #readList(List, ClassLoader)}, {@link #readArrayList}(ClassLoader), {@link #writeMap}(Map), {@link #readMap(Map, ClassLoader)}, {@link #writeSparseArray}(SparseArray), {@link #readSparseArray}(ClassLoader). */ var Parcel = { /***/ STRING_CREATOR : "null", /**Retrieve a new Parcel object from the pool. */ obtain : function( ) {}, /**Put a Parcel object back into the pool. You must not touch the object after this call. */ recycle : function( ) {}, /**Set a {@link android.os.Parcel.ReadWriteHelper}, which can be used to avoid having duplicate strings, for example. @hide */ setReadWriteHelper : function( ) {}, /** @return {Boolean} whether this parcel has a {@link ReadWriteHelper}. @hide */ hasReadWriteHelper : function( ) {}, /** @hide */ getGlobalAllocSize : function( ) {}, /** @hide */ getGlobalAllocCount : function( ) {}, /**Returns the total amount of data contained in the parcel. */ dataSize : function( ) {}, /**Returns the amount of data remaining to be read from the parcel. That is, {@link #dataSize}-{@link #dataPosition}. */ dataAvail : function( ) {}, /**Returns the current position in the parcel data. Never more than {@link #dataSize}. */ dataPosition : function( ) {}, /**Returns the total amount of space in the parcel. This is always >= {@link #dataSize}. The difference between it and dataSize() is the amount of room left until the parcel needs to re-allocate its data buffer. */ dataCapacity : function( ) {}, /**Change the amount of data in the parcel. Can be either smaller or larger than the current size. If larger than the current capacity, more memory will be allocated. @param {Number} size The new number of bytes in the Parcel. */ setDataSize : function( ) {}, /**Move the current read/write position in the parcel. @param {Number} pos New offset in the parcel; must be between 0 and {@link #dataSize}. */ setDataPosition : function( ) {}, /**Change the capacity (current available space) of the parcel. @param {Number} size The new capacity of the parcel, in bytes. Can not be less than {@link #dataSize} -- that is, you can not drop existing data with this method. */ setDataCapacity : function( ) {}, /** @hide */ pushAllowFds : function( ) {}, /** @hide */ restoreAllowFds : function( ) {}, /**Returns the raw bytes of the parcel. <p class="note">The data you retrieve here <strong>must not</strong> be placed in any kind of persistent storage (on local disk, across a network, etc). For that, you should use standard serialization or another kind of general serialization mechanism. The Parcel marshalled representation is highly optimized for local IPC, and as such does not attempt to maintain compatibility with data created in different versions of the platform. */ marshall : function( ) {}, /**Set the bytes in data to be the raw bytes of this Parcel. */ unmarshall : function( ) {}, /** */ appendFrom : function( ) {}, /** @hide */ compareData : function( ) {}, /** @hide */ setClassCookie : function( ) {}, /** @hide */ getClassCookie : function( ) {}, /** @hide */ adoptClassCookies : function( ) {}, /** @hide */ copyClassCookies : function( ) {}, /** @hide */ putClassCookies : function( ) {}, /**Report whether the parcel contains any marshalled file descriptors. */ hasFileDescriptors : function( ) {}, /**Store or read an IBinder interface token in the parcel at the current {@link #dataPosition}. This is used to validate that the marshalled transaction is intended for the target interface. */ writeInterfaceToken : function( ) {}, /** */ enforceInterface : function( ) {}, /**Writes the work source uid to the request headers. <p>It requires the headers to have been written/read already to replace the work source. @return {Boolean} true if the request headers have been updated. @hide */ replaceCallingWorkSourceUid : function( ) {}, /**Reads the work source uid from the request headers. <p>Unlike other read methods, this method does not read the parcel at the current {@link #dataPosition}. It will set the {@link #dataPosition} before the read and restore the position after reading the request header. @return {Number} the work source uid or {@link Binder#UNSET_WORKSOURCE} if headers have not been written/parsed yet. @hide */ readCallingWorkSourceUid : function( ) {}, /**Write a byte array into the parcel at the current {@link #dataPosition}, growing {@link #dataCapacity} if needed. @param {Object {byte[]}} b Bytes to place into the parcel. */ writeByteArray : function( ) {}, /**Write a byte array into the parcel at the current {@link #dataPosition}, growing {@link #dataCapacity} if needed. @param {Object {byte[]}} b Bytes to place into the parcel. @param {Number} offset Index of first byte to be written. @param {Number} len Number of bytes to write. */ writeByteArray : function( ) {}, /**Write a blob of data into the parcel at the current {@link #dataPosition}, growing {@link #dataCapacity} if needed. @param {Object {byte[]}} b Bytes to place into the parcel. {@hide} {@SystemApi} */ writeBlob : function( ) {}, /**Write a blob of data into the parcel at the current {@link #dataPosition}, growing {@link #dataCapacity} if needed. @param {Object {byte[]}} b Bytes to place into the parcel. @param {Number} offset Index of first byte to be written. @param {Number} len Number of bytes to write. {@hide} {@SystemApi} */ writeBlob : function( ) {}, /**Write an integer value into the parcel at the current dataPosition(), growing dataCapacity() if needed. */ writeInt : function( ) {}, /**Write a long integer value into the parcel at the current dataPosition(), growing dataCapacity() if needed. */ writeLong : function( ) {}, /**Write a floating point value into the parcel at the current dataPosition(), growing dataCapacity() if needed. */ writeFloat : function( ) {}, /**Write a double precision floating point value into the parcel at the current dataPosition(), growing dataCapacity() if needed. */ writeDouble : function( ) {}, /**Write a string value into the parcel at the current dataPosition(), growing dataCapacity() if needed. */ writeString : function( ) {}, /**Write a string without going though a {@link android.os.Parcel.ReadWriteHelper}. Subclasses of {@link android.os.Parcel.ReadWriteHelper} must use this method instead of {@link #writeString} to avoid infinity recursive calls. @hide */ writeStringNoHelper : function( ) {}, /**Write a boolean value into the parcel at the current dataPosition(), growing dataCapacity() if needed. <p>Note: This method currently delegates to writeInt with a value of 1 or 0 for true or false, respectively, but may change in the future. */ writeBoolean : function( ) {}, /**Write a CharSequence value into the parcel at the current dataPosition(), growing dataCapacity() if needed. @hide */ writeCharSequence : function( ) {}, /**Write an object into the parcel at the current dataPosition(), growing dataCapacity() if needed. */ writeStrongBinder : function( ) {}, /**Write an object into the parcel at the current dataPosition(), growing dataCapacity() if needed. */ writeStrongInterface : function( ) {}, /**Write a FileDescriptor into the parcel at the current dataPosition(), growing dataCapacity() if needed. <p class="caution">The file descriptor will not be closed, which may result in file descriptor leaks when objects are returned from Binder calls. Use {@link android.os.ParcelFileDescriptor#writeToandroid.os.Parcel} instead, which accepts contextual flags and will close the original file descriptor if {@link android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE} is set.</p> */ writeFileDescriptor : function( ) {}, /**{@hide} This will be the new name for writeFileDescriptor, for consistency. */ writeRawFileDescriptor : function( ) {}, /**{@hide} Write an array of FileDescriptor objects into the Parcel. @param {Object {java.io.FileDescriptor[]}} value The array of objects to be written. */ writeRawFileDescriptorArray : function( ) {}, /**Write a byte value into the parcel at the current dataPosition(), growing dataCapacity() if needed. <p>Note: This method currently delegates to writeInt but may change in the future. */ writeByte : function( ) {}, /**Please use {@link #writeBundle} instead. Flattens a Map into the parcel at the current dataPosition(), growing dataCapacity() if needed. The Map keys must be String objects. The Map values are written using {@link #writeValue} and must follow the specification there. <p>It is strongly recommended to use {@link #writeBundle} instead of this method, since the Bundle class provides a type-safe API that allows you to avoid mysterious type errors at the point of marshalling. */ writeMap : function( ) {}, /** @hide For testing only. */ writeArrayMap : function( ) {}, /**Flatten an {@link ArrayMap} with string keys containing a particular object type into the parcel at the current dataPosition() and growing dataCapacity() if needed. The type of the objects in the array must be one that implements Parcelable. Only the raw data of the objects is written and not their type, so you must use the corresponding {@link #createTypedArrayMap(Parcelable.Creator)} @param {Object {android.util.ArrayMap}} val The map of objects to be written. @param {Number} parcelableFlags The parcelable flags to use. @see #createTypedArrayMap(Parcelable.Creator) @see Parcelable */ writeTypedArrayMap : function( ) {}, /**Write an array set to the parcel. @param {Object {android.util.ArraySet}} val The array set to write. @hide */ writeArraySet : function( ) {}, /**Flatten a Bundle into the parcel at the current dataPosition(), growing dataCapacity() if needed. */ writeBundle : function( ) {}, /**Flatten a PersistableBundle into the parcel at the current dataPosition(), growing dataCapacity() if needed. */ writePersistableBundle : function( ) {}, /**Flatten a Size into the parcel at the current dataPosition(), growing dataCapacity() if needed. */ writeSize : function( ) {}, /**Flatten a SizeF into the parcel at the current dataPosition(), growing dataCapacity() if needed. */ writeSizeF : function( ) {}, /**Flatten a List into the parcel at the current dataPosition(), growing dataCapacity() if needed. The List values are written using {@link #writeValue} and must follow the specification there. */ writeList : function( ) {}, /**Flatten an Object array into the parcel at the current dataPosition(), growing dataCapacity() if needed. The array values are written using {@link #writeValue} and must follow the specification there. */ writeArray : function( ) {}, /**Flatten a generic SparseArray into the parcel at the current dataPosition(), growing dataCapacity() if needed. The SparseArray values are written using {@link #writeValue} and must follow the specification there. */ writeSparseArray : function( ) {}, /** */ writeSparseBooleanArray : function( ) {}, /** @hide */ writeSparseIntArray : function( ) {}, /** */ writeBooleanArray : function( ) {}, /** */ createBooleanArray : function( ) {}, /** */ readBooleanArray : function( ) {}, /** */ writeCharArray : function( ) {}, /** */ createCharArray : function( ) {}, /** */ readCharArray : function( ) {}, /** */ writeIntArray : function( ) {}, /** */ createIntArray : function( ) {}, /** */ readIntArray : function( ) {}, /** */ writeLongArray : function( ) {}, /** */ createLongArray : function( ) {}, /** */ readLongArray : function( ) {}, /** */ writeFloatArray : function( ) {}, /** */ createFloatArray : function( ) {}, /** */ readFloatArray : function( ) {}, /** */ writeDoubleArray : function( ) {}, /** */ createDoubleArray : function( ) {}, /** */ readDoubleArray : function( ) {}, /** */ writeStringArray : function( ) {}, /** */ createStringArray : function( ) {}, /** */ readStringArray : function( ) {}, /** */ writeBinderArray : function( ) {}, /** @hide */ writeCharSequenceArray : function( ) {}, /** @hide */ writeCharSequenceList : function( ) {}, /** */ createBinderArray : function( ) {}, /** */ readBinderArray : function( ) {}, /**Flatten a List containing a particular object type into the parcel, at the current dataPosition() and growing dataCapacity() if needed. The type of the objects in the list must be one that implements Parcelable. Unlike the generic writeList() method, however, only the raw data of the objects is written and not their type, so you must use the corresponding readTypedList() to unmarshall them. @param {Object {java.util.List}} val The list of objects to be written. @see #createTypedArrayList @see #readTypedList @see Parcelable */ writeTypedList : function( ) {}, /**Flatten a {@link SparseArray} containing a particular object type into the parcel at the current dataPosition() and growing dataCapacity() if needed. The type of the objects in the array must be one that implements Parcelable. Unlike the generic {@link #writeSparseArray}(SparseArray) method, however, only the raw data of the objects is written and not their type, so you must use the corresponding {@link #createTypedSparseArray(Parcelable.Creator)}. @param {Object {android.util.SparseArray}} val The list of objects to be written. @param {Number} parcelableFlags The parcelable flags to use. @see #createTypedSparseArray(Parcelable.Creator) @see Parcelable */ writeTypedSparseArray : function( ) {}, /** @hide */ writeTypedList : function( ) {}, /**Flatten a List containing String objects into the parcel, at the current dataPosition() and growing dataCapacity() if needed. They can later be retrieved with {@link #createStringArrayList} or {@link #readStringList}. @param {Object {java.util.List}} val The list of strings to be written. @see #createStringArrayList @see #readStringList */ writeStringList : function( ) {}, /**Flatten a List containing IBinder objects into the parcel, at the current dataPosition() and growing dataCapacity() if needed. They can later be retrieved with {@link #createBinderArrayList} or {@link #readBinderList}. @param {Object {java.util.List}} val The list of strings to be written. @see #createBinderArrayList @see #readBinderList */ writeBinderList : function( ) {}, /**Flatten a {@code List} containing arbitrary {@code Parcelable} objects into this parcel at the current position. They can later be retrieved using {@link #readParcelableList(List, ClassLoader)} if required. @see #readParcelableList(List, ClassLoader) */ writeParcelableList : function( ) {}, /**Flatten a homogeneous array containing a particular object type into the parcel, at the current dataPosition() and growing dataCapacity() if needed. The type of the objects in the array must be one that implements Parcelable. Unlike the {@link #writeParcelableArray} method, however, only the raw data of the objects is written and not their type, so you must use {@link #readTypedArray} with the correct corresponding {@link android.os.Parcelable.Creator} implementation to unmarshall them. @param {Object {android.os.Parcelable[]}} val The array of objects to be written. @param {Number} parcelableFlags Contextual flags as per {@link Parcelable#writeToParcel(Parcel, int) Parcelable.writeToParcel()}. @see #readTypedArray @see #writeParcelableArray @see Parcelable.Creator */ writeTypedArray : function( ) {}, /**Flatten the Parcelable object into the parcel. @param {Object {Parcelable}} val The Parcelable object to be written. @param {Number} parcelableFlags Contextual flags as per {@link Parcelable#writeToParcel(Parcel, int) Parcelable.writeToParcel()}. @see #readTypedObject */ writeTypedObject : function( ) {}, /**Flatten a generic object in to a parcel. The given Object value may currently be one of the following types: <ul> <li> null <li> String <li> Byte <li> Short <li> Integer <li> Long <li> Float <li> Double <li> Boolean <li> String[] <li> boolean[] <li> byte[] <li> int[] <li> long[] <li> Object[] (supporting objects of the same type defined here). <li> {@link android.os.Bundle} <li> Map (as supported by {@link #writeMap}). <li> Any object that implements the {@link android.os.Parcelable} protocol. <li> Parcelable[] <li> CharSequence (as supported by {@link TextUtils#writeToParcel}). <li> List (as supported by {@link #writeList}). <li> {@link SparseArray} (as supported by {@link #writeSparseArray}(SparseArray)). <li> {@link android.os.IBinder} <li> Any object that implements Serializable (but see {@link #writeSerializable} for caveats). Note that all of the previous types have relatively efficient implementations for writing to a Parcel; having to rely on the generic serialization approach is much less efficient and should be avoided whenever possible. </ul> <p class="caution">{@link android.os.Parcelable} objects are written with {@link android.os.Parcelable#writeToandroid.os.Parcel} using contextual flags of 0. When serializing objects containing {@link android.os.ParcelFileDescriptor}s, this may result in file descriptor leaks when they are returned from Binder calls (where {@link android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE} should be used).</p> */ writeValue : function( ) {}, /**Flatten the name of the class of the Parcelable and its contents into the parcel. @param {Object {Parcelable}} p The Parcelable object to be written. @param {Number} parcelableFlags Contextual flags as per {@link Parcelable#writeToParcel(Parcel, int) Parcelable.writeToParcel()}. */ writeParcelable : function( ) {}, /** @hide */ writeParcelableCreator : function( ) {}, /**Write a generic serializable object in to a Parcel. It is strongly recommended that this method be avoided, since the serialization overhead is extremely large, and this approach will be much slower than using the other approaches to writing data in to a Parcel. */ writeSerializable : function( ) {}, /** @hide For debugging purposes */ setStackTraceParceling : function( ) {}, /**Special function for writing an exception result at the header of a parcel, to be used when returning an exception from a transaction. Note that this currently only supports a few exception types; any other exception will be re-thrown by this function as a RuntimeException (to be caught by the system's last-resort exception handling when dispatching a transaction). <p>The supported exception types are: <ul> <li>{@link android.os.BadParcelableException} <li>{@link IllegalArgumentException} <li>{@link IllegalStateException} <li>{@link NullPointerException} <li>{@link SecurityException} <li>{@link UnsupportedOperationException} <li>{@link android.os.NetworkOnMainThreadException} </ul> @param {Object {Exception}} e The Exception to be written. @see #writeNoException @see #readException */ writeException : function( ) {}, /**Special function for writing information at the front of the Parcel indicating that no exception occurred. @see #writeException @see #readException */ writeNoException : function( ) {}, /**Special function for reading an exception result from the header of a parcel, to be used after receiving the result of a transaction. This will throw the exception for you if it had been written to the Parcel, otherwise return and let you read the normal result data from the Parcel. @see #writeException @see #writeNoException */ readException : function( ) {}, /**Parses the header of a Binder call's response Parcel and returns the exception code. Deals with lite or fat headers. In the common successful case, this header is generally zero. In less common cases, it's a small negative number and will be followed by an error string. This exists purely for android.database.DatabaseUtils and insulating it from having to handle fat headers as returned by e.g. StrictMode-induced RPC responses. @hide */ readExceptionCode : function( ) {}, /**Throw an exception with the given message. Not intended for use outside the Parcel class. @param {Number} code Used to determine which exception class to throw. @param {String} msg The exception message. */ readException : function( ) {}, /**Read an integer value from the parcel at the current dataPosition(). */ readInt : function( ) {}, /**Read a long integer value from the parcel at the current dataPosition(). */ readLong : function( ) {}, /**Read a floating point value from the parcel at the current dataPosition(). */ readFloat : function( ) {}, /**Read a double precision floating point value from the parcel at the current dataPosition(). */ readDouble : function( ) {}, /**Read a string value from the parcel at the current dataPosition(). */ readString : function( ) {}, /**Read a string without going though a {@link android.os.Parcel.ReadWriteHelper}. Subclasses of {@link android.os.Parcel.ReadWriteHelper} must use this method instead of {@link #readString} to avoid infinity recursive calls. @hide */ readStringNoHelper : function( ) {}, /**Read a boolean value from the parcel at the current dataPosition(). */ readBoolean : function( ) {}, /**Read a CharSequence value from the parcel at the current dataPosition(). @hide */ readCharSequence : function( ) {}, /**Read an object from the parcel at the current dataPosition(). */ readStrongBinder : function( ) {}, /**Read a FileDescriptor from the parcel at the current dataPosition(). */ readFileDescriptor : function( ) {}, /**{@hide} */ readRawFileDescriptor : function( ) {}, /**{@hide} Read and return a new array of FileDescriptors from the parcel. @return {Object {java.io.FileDescriptor}} the FileDescriptor array, or null if the array is null. */ createRawFileDescriptorArray : function( ) {}, /**{@hide} Read an array of FileDescriptors from a parcel. The passed array must be exactly the length of the array in the parcel. @return {Object {void}} the FileDescriptor array, or null if the array is null. */ readRawFileDescriptorArray : function( ) {}, /**Read a byte value from the parcel at the current dataPosition(). */ readByte : function( ) {}, /**Please use {@link #readBundle}(ClassLoader) instead (whose data must have been written with {@link #writeBundle}. Read into an existing Map object from the parcel at the current dataPosition(). */ readMap : function( ) {}, /**Read into an existing List object from the parcel at the current dataPosition(), using the given class loader to load any enclosed Parcelables. If it is null, the default class loader is used. */ readList : function( ) {}, /**Please use {@link #readBundle}(ClassLoader) instead (whose data must have been written with {@link #writeBundle}. Read and return a new HashMap object from the parcel at the current dataPosition(), using the given class loader to load any enclosed Parcelables. Returns null if the previously written map object was null. */ readHashMap : function( ) {}, /**Read and return a new Bundle object from the parcel at the current dataPosition(). Returns null if the previously written Bundle object was null. */ readBundle : function( ) {}, /**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. Returns null if the previously written Bundle object was null. */ readBundle : function( ) {}, /**Read and return a new Bundle object from the parcel at the current dataPosition(). Returns null if the previously written Bundle object was null. */ readPersistableBundle : function( ) {}, /**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. Returns null if the previously written Bundle object was null. */ readPersistableBundle : function( ) {}, /**Read a Size from the parcel at the current dataPosition(). */ readSize : function( ) {}, /**Read a SizeF from the parcel at the current dataPosition(). */ readSizeF : function( ) {}, /**Read and return a byte[] object from the parcel. */ createByteArray : function( ) {}, /**Read a byte[] object from the parcel and copy it into the given byte array. */ readByteArray : function( ) {}, /**Read a blob of data from the parcel and return it as a byte array. {@hide} {@SystemApi} */ readBlob : function( ) {}, /**Read and return a String[] object from the parcel. {@hide} */ readStringArray : function( ) {}, /**Read and return a CharSequence[] object from the parcel. {@hide} */ readCharSequenceArray : function( ) {}, /**Read and return an ArrayList<CharSequence> object from the parcel. {@hide} */ readCharSequenceList : function( ) {}, /**Read and return a new ArrayList object from the parcel at the current dataPosition(). Returns null if the previously written list object was null. The given class loader will be used to load any enclosed Parcelables. */ readArrayList : function( ) {}, /**Read and return a new Object array from the parcel at the current dataPosition(). Returns null if the previously written array was null. The given class loader will be used to load any enclosed Parcelables. */ readArray : function( ) {}, /**Read and return a new SparseArray object from the parcel at the current dataPosition(). Returns null if the previously written list object was null. The given class loader will be used to load any enclosed Parcelables. */ readSparseArray : function( ) {}, /**Read and return a new SparseBooleanArray object from the parcel at the current dataPosition(). Returns null if the previously written list object was null. */ readSparseBooleanArray : function( ) {}, /**Read and return a new SparseIntArray object from the parcel at the current dataPosition(). Returns null if the previously written array object was null. @hide */ readSparseIntArray : function( ) {}, /**Read and return a new ArrayList containing a particular object type from the parcel that was written with {@link #writeTypedList} at the current dataPosition(). Returns null if the previously written list object was null. The list <em>must</em> have previously been written via {@link #writeTypedList} with the same object type. @return {Object {java.util.ArrayList}} A newly created ArrayList containing objects with the same data as those that were previously written. @see #writeTypedList */ createTypedArrayList : function( ) {}, /**Read into the given List items containing a particular object type that were written with {@link #writeTypedList} at the current dataPosition(). The list <em>must</em> have previously been written via {@link #writeTypedList} with the same object type. @return {Object {void}} A newly created ArrayList containing objects with the same data as those that were previously written. @see #writeTypedList */ readTypedList : function( ) {}, /**Read into a new {@link SparseArray} items containing a particular object type that were written with {@link #writeTypedSparseArray(SparseArray, int)} at the current dataPosition(). The list <em>must</em> have previously been written via {@link #writeTypedSparseArray(SparseArray, int)} with the same object type. @param {Object {android.os.Parcelable.Creator}} creator The creator to use when for instantiation. @return {Object {android.util.SparseArray}} A newly created {@link SparseArray} containing objects with the same data as those that were previously written. @see #writeTypedSparseArray(SparseArray, int) */ createTypedSparseArray : function( ) {}, /**Read into a new {@link ArrayMap} with string keys items containing a particular object type that were written with {@link #writeTypedArrayMap(ArrayMap, int)} at the current dataPosition(). The list <em>must</em> have previously been written via {@link #writeTypedArrayMap(ArrayMap, int)} with the same object type. @param {Object {android.os.Parcelable.Creator}} creator The creator to use when for instantiation. @return {Object {android.util.ArrayMap}} A newly created {@link ArrayMap} containing objects with the same data as those that were previously written. @see #writeTypedArrayMap(ArrayMap, int) */ createTypedArrayMap : function( ) {}, /**Read and return a new ArrayList containing String objects from the parcel that was written with {@link #writeStringList} at the current dataPosition(). Returns null if the previously written list object was null. @return {Object {java.util.ArrayList}} A newly created ArrayList containing strings with the same data as those that were previously written. @see #writeStringList */ createStringArrayList : function( ) {}, /**Read and return a new ArrayList containing IBinder objects from the parcel that was written with {@link #writeBinderList} at the current dataPosition(). Returns null if the previously written list object was null. @return {Object {java.util.ArrayList}} A newly created ArrayList containing strings with the same data as those that were previously written. @see #writeBinderList */ createBinderArrayList : function( ) {}, /**Read into the given List items String objects that were written with {@link #writeStringList} at the current dataPosition(). @see #writeStringList */ readStringList : function( ) {}, /**Read into the given List items IBinder objects that were written with {@link #writeBinderList} at the current dataPosition(). @see #writeBinderList */ readBinderList : function( ) {}, /**Read the list of {@code Parcelable} objects at the current data position into the given {@code list}. The contents of the {@code list} are replaced. If the serialized list was {@code null}, {@code list} is cleared. @see #writeParcelableList(List, int) */ readParcelableList : function( ) {}, /**Read and return a new array containing a particular object type from the parcel at the current dataPosition(). Returns null if the previously written array was null. The array <em>must</em> have previously been written via {@link #writeTypedArray} with the same object type. @return {Object {java.lang.Object}} A newly created array containing objects with the same data as those that were previously written. @see #writeTypedArray */ createTypedArray : function( ) {}, /** */ readTypedArray : function( ) {}, /** @deprecated @hide */ readTypedArray : function( ) {}, /**Read and return a typed Parcelable object from a parcel. Returns null if the previous written object was null. The object <em>must</em> have previous been written via {@link #writeTypedObject} with the same object type. @return {Object {java.lang.Object}} A newly created object of the type that was previously written. @see #writeTypedObject */ readTypedObject : function( ) {}, /**Write a heterogeneous array of Parcelable objects into the Parcel. Each object in the array is written along with its class name, so that the correct class can later be instantiated. As a result, this has significantly more overhead than {@link #writeTypedArray}, but will correctly handle an array containing more than one type of object. @param {Object {android.os.Parcelable[]}} value The array of objects to be written. @param {Number} parcelableFlags Contextual flags as per {@link Parcelable#writeToParcel(Parcel, int) Parcelable.writeToParcel()}. @see #writeTypedArray */ writeParcelableArray : function( ) {}, /**Read a typed object from a parcel. The given class loader will be used to load any enclosed Parcelables. If it is null, the default class loader will be used. */ readValue : function( ) {}, /**Read and return a new Parcelable from the parcel. The given class loader will be used to load any enclosed Parcelables. If it is null, the default class loader will be used. @param {Object {ClassLoader}} loader A ClassLoader from which to instantiate the Parcelable object, or null for the default class loader. @return {Object {android.os.Parcelable}} Returns the newly created Parcelable, or null if a null object has been written. @throws BadParcelableException Throws BadParcelableException if there was an error trying to instantiate the Parcelable. */ readParcelable : function( ) {}, /** @hide */ readCreator : function( ) {}, /** @hide */ readParcelableCreator : function( ) {}, /**Read and return a new Parcelable array from the parcel. The given class loader will be used to load any enclosed Parcelables. @return {Object {android.os.Parcelable}} the Parcelable array, or null if the array is null */ readParcelableArray : function( ) {}, /** @hide */ readParcelableArray : function( ) {}, /**Read and return a new Serializable object from the parcel. @return {Object {java.io.Serializable}} the Serializable object, or null if the Serializable name wasn't found in the parcel. */ readSerializable : function( ) {}, /** @hide For testing only. */ readArrayMap : function( ) {}, /**Reads an array set. @param {Object {ClassLoader}} loader The class loader to use. @hide */ readArraySet : function( ) {}, /** @hide For testing */ getBlobAshmemSize : function( ) {}, };