Class ParcelUtils
- 
                    
                    - All Implemented Interfaces:
 
 public class ParcelUtils
- 
                
                    
                    - 
                                
                            
                                Constructor SummaryConstructors Constructor Description ParcelUtils()
 - 
                                
                            
                                Method SummaryModifier and Type Method Description static voidwriteToParcel(Parcel out, byte obj)Writes byte type data to the parcel static voidwriteToParcel(Parcel out, String obj)Writes a String type data into the parcel. static voidwriteToParcel(Parcel out, Long obj)Writes a Long type data into the parcel static voidwriteToParcel(Parcel out, Integer obj)Writes Integer type data into the parcel. static voidwriteToParcel(Parcel out, Float obj)Writes Float type data into the parcel static voidwriteToParcel(Parcel out, Double obj)Writes Double type data to the parcel static voidwriteToParcel(Parcel out, Map obj)Writes Map type data into the parcel. static voidwriteToParcel(Parcel out, Date obj)Writes Date type data into the parcel static FloatreadFloatFromParcel(Parcel in)Reads Float type data from Parcel static DoublereadDoubleFromParcel(Parcel in)Reads a Double type data from Parcel static DatereadDateFromParcel(Parcel in)Reads Date type data from Parcel static IntegerreadIntFromParcel(Parcel in)Reads an Integer type data from Parcel static LongreadLongFromParcel(Parcel in)Reads a Long type data from Parcel static StringreadFromParcel(Parcel in)Reads String type data from Parcel static MapreadMapFromParcel(Parcel in)Reads Map type data from Parcel static <T extends Parcelable> TreadFromParcel(Parcel in, Class<T> cls)Read and return a new Parcelable from the parcel. static <T extends Parcelable> voidwriteToParcel(Parcel out, T model)Flatten the name of the class of the Parcelable and its contents into the parcel. static <T extends List<out Object>> voidwriteToParcel(Parcel out, T model)Flatten a List into the parcel at the current dataPosition(), growing dataCapacity() if needed. static <T> ArrayList<T>readListFromParcel(Parcel in, Class<T> cls)Read and return a new ArrayList object from the parcel at the current dataPosition(). static voidwriteListToParcel(Parcel out, List<out Object> collection)Flatten a List into the parcel at the current dataPosition(), growing dataCapacity() if needed. static <T extends Parcelable> TbytesToParcelable(Array<byte> data, Class<T> cls)Read and return a new Parcelable from the parcel. static Array<byte>parcelableToByte(Parcelable model)Returns the raw bytes of the parcel. static <T extends Parcelable> List<T>bytesToParcelableList(Array<byte> data, Class<T> cls)Read and return a new ArrayList object from the parcel at the current dataPosition(). static Array<byte>parcelableListToByte(List<out Parcelable> list)Returns the raw bytes of the parcel. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        writeToParcelstatic void writeToParcel(Parcel out, byte obj) Writes byte type data to the parcel - Parameters:
- out- Parcel
- obj- byte type data
 
 - 
                                        writeToParcelstatic void writeToParcel(Parcel out, String obj) Writes a String type data into the parcel. - Parameters:
- out- Parcel
- obj- String type data
 
 - 
                                        writeToParcelstatic void writeToParcel(Parcel out, Long obj) Writes a Long type data into the parcel - Parameters:
- out- Parcel
- obj- Long type data
 
 - 
                                        writeToParcelstatic void writeToParcel(Parcel out, Integer obj) Writes Integer type data into the parcel. - Parameters:
- out- Parcel
- obj- Integer type data
 
 - 
                                        writeToParcelstatic void writeToParcel(Parcel out, Float obj) Writes Float type data into the parcel - Parameters:
- out- Parcel
- obj- Float type data
 
 - 
                                        writeToParcelstatic void writeToParcel(Parcel out, Double obj) Writes Double type data to the parcel - Parameters:
- out- Parcel
- obj- Double type data
 
 - 
                                        writeToParcelstatic void writeToParcel(Parcel out, Map obj) Writes Map type data into the parcel. - Parameters:
- out- Parcel
- obj- Map type data
 
 - 
                                        writeToParcelstatic void writeToParcel(Parcel out, Date obj) Writes Date type data into the parcel - Parameters:
- out- Parcel
- obj- Date type data
 
 - 
                                        readFloatFromParcelstatic Float readFloatFromParcel(Parcel in) Reads Float type data from Parcel - Parameters:
- in- Parcel
- Returns:
- Float type data 
 
 - 
                                        readDoubleFromParcelstatic Double readDoubleFromParcel(Parcel in) Reads a Double type data from Parcel - Parameters:
- in- Parcel
- Returns:
- Double type data 
 
 - 
                                        readDateFromParcelstatic Date readDateFromParcel(Parcel in) Reads Date type data from Parcel - Parameters:
- in- Parcel
- Returns:
- Date type data 
 
 - 
                                        readIntFromParcelstatic Integer readIntFromParcel(Parcel in) Reads an Integer type data from Parcel - Parameters:
- in- Parcel
- Returns:
- Integer type data 
 
 - 
                                        readLongFromParcelstatic Long readLongFromParcel(Parcel in) Reads a Long type data from Parcel - Parameters:
- in- Parcel
- Returns:
- Long type data 
 
 - 
                                        readFromParcelstatic String readFromParcel(Parcel in) Reads String type data from Parcel - Parameters:
- in- Parcel
- Returns:
- String type data 
 
 - 
                                        readMapFromParcelstatic Map readMapFromParcel(Parcel in) Reads Map type data from Parcel - Parameters:
- in- Parcel
- Returns:
- Map type data 
 
 - 
                                        readFromParcelstatic <T extends Parcelable> T readFromParcel(Parcel in, Class<T> cls) Read and return a new Parcelable from the parcel. - Parameters:
- in- Parcel
- cls- Class
- Returns:
- Returns the newly created Parcelable, or null if a null object has been written. 
 
 - 
                                        writeToParcelstatic <T extends Parcelable> void writeToParcel(Parcel out, T model) Flatten the name of the class of the Parcelable and its contents into the parcel. - Parameters:
- out- Parcel
- model- java object
 
 - 
                                        writeToParcelstatic <T extends List<out Object>> void writeToParcel(Parcel out, T model) Flatten a List into the parcel at the current dataPosition(), growing dataCapacity() if needed. - Parameters:
- out- Parcel
- model- java object
 
 - 
                                        readListFromParcelstatic <T> ArrayList<T> readListFromParcel(Parcel in, Class<T> cls) 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. - Parameters:
- in- Parcel
- cls- Class
 
 - 
                                        writeListToParcelstatic void writeListToParcel(Parcel out, List<out Object> collection) Flatten a List into the parcel at the current dataPosition(), growing dataCapacity() if needed. - Parameters:
- out- Parcel
- collection- List
 
 - 
                                        bytesToParcelablestatic <T extends Parcelable> T bytesToParcelable(Array<byte> data, Class<T> cls) Read and return a new Parcelable from the parcel. - Parameters:
- data- byte array
- cls- Class
- Returns:
- Returns the newly created Parcelable, or null if a null object has been written. 
 
 - 
                                        parcelableToBytestatic Array<byte> parcelableToByte(Parcelable model) Returns the raw bytes of the parcel. - Parameters:
- model- Parcelable
- Returns:
- Returns the raw bytes of the parcel. 
 
 - 
                                        bytesToParcelableListstatic <T extends Parcelable> List<T> bytesToParcelableList(Array<byte> data, Class<T> cls) 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. - Parameters:
- data- byte array
- cls- Class
- Returns:
- a new ArrayList object from the parcel at the current dataPosition(). 
 
 - 
                                        parcelableListToBytestatic Array<byte> parcelableListToByte(List<out Parcelable> list) Returns the raw bytes of the parcel. - Parameters:
- list- Parcelable list
- Returns:
- Returns the raw bytes of the parcel. 
 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-