ParcelUtils

public class ParcelUtils

Constructors

Link copied to clipboard
public void ParcelUtils()

Functions

Link copied to clipboard
public static T bytesToParcelable<T extends Parcelable>(Array<byte> data, Class<T> cls)
Read and return a new Parcelable from the parcel.
Link copied to clipboard
public static List<T> bytesToParcelableList<T extends Parcelable>(Array<byte> data, Class<T> cls)
Read and return a new ArrayList object from the parcel at the current dataPosition().
Link copied to clipboard
public static Array<byte> parcelableListToByte(List<? extends Parcelable> list)
Returns the raw bytes of the parcel.
Link copied to clipboard
public static Array<byte> parcelableToByte(Parcelable model)
Returns the raw bytes of the parcel.
Link copied to clipboard
public static Date readDateFromParcel(Parcel in)
Reads Date type data from Parcel
Link copied to clipboard
public static Double readDoubleFromParcel(Parcel in)
Reads a Double type data from Parcel
Link copied to clipboard
public static Float readFloatFromParcel(Parcel in)
Reads Float type data from Parcel
Link copied to clipboard
public static String readFromParcel(Parcel in)
Reads String type data from Parcel
public static T readFromParcel<T extends Parcelable>(Parcel in, Class<T> cls)
Read and return a new Parcelable from the parcel.
Link copied to clipboard
public static Integer readIntFromParcel(Parcel in)
Reads an Integer type data from Parcel
Link copied to clipboard
public static ArrayList<T> readListFromParcel<T>(Parcel in, Class<T> cls)
Read and return a new ArrayList object from the parcel at the current dataPosition().
Link copied to clipboard
public static Long readLongFromParcel(Parcel in)
Reads a Long type data from Parcel
Link copied to clipboard
public static Map readMapFromParcel(Parcel in)
Reads Map type data from Parcel
Link copied to clipboard
public static void writeListToParcel(Parcel out, List<? extends Object> collection)
Flatten a List into the parcel at the current dataPosition(), growing dataCapacity() if needed.
Link copied to clipboard
public static void writeToParcel<T extends Parcelable>(Parcel out, T model)
Flatten the name of the class of the Parcelable and its contents into the parcel.
public static void writeToParcel<T extends List<? extends Object>>(Parcel out, T model)
Flatten a List into the parcel at the current dataPosition(), growing dataCapacity() if needed.
public static void writeToParcel(Parcel out, byte obj)
Writes byte type data to the parcel
public static void writeToParcel(Parcel out, Double obj)
Writes Double type data to the parcel
public static void writeToParcel(Parcel out, Float obj)
Writes Float type data into the parcel
public static void writeToParcel(Parcel out, Integer obj)
Writes Integer type data into the parcel.
public static void writeToParcel(Parcel out, Long obj)
Writes a Long type data into the parcel
public static void writeToParcel(Parcel out, String obj)
Writes a String type data into the parcel.
public static void writeToParcel(Parcel out, Date obj)
Writes Date type data into the parcel
public static void writeToParcel(Parcel out, Map obj)
Writes Map type data into the parcel.