# ParcelUtils

public class ParcelUtils

## Constructors

ParcelUtils
Link copied to clipboard
public void ParcelUtils()

## Functions

bytesToParcelable
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.
bytesToParcelableList
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().
parcelableListToByte
Link copied to clipboard
public static Array<byte> parcelableListToByte(List<? extends Parcelable> list)
Returns the raw bytes of the parcel.
parcelableToByte
Link copied to clipboard
public static Array<byte> parcelableToByte(Parcelable model)
Returns the raw bytes of the parcel.
readDateFromParcel
Link copied to clipboard
public static Date readDateFromParcel(Parcel in)
从 Parcel 中读取 Date 类型数据
readDoubleFromParcel
Link copied to clipboard
public static Double readDoubleFromParcel(Parcel in)
从 Parcel 中读取 Double 类型数据
readFloatFromParcel
Link copied to clipboard
public static Float readFloatFromParcel(Parcel in)
从 Parcel 中读取 Float 类型数据
readFromParcel
Link copied to clipboard
public static String readFromParcel(Parcel in)
从 Parcel 中读取 String 类型数据
public static T readFromParcel<T extends Parcelable>(Parcel in, Class<T> cls)
Read and return a new Parcelable from the parcel.
readIntFromParcel
Link copied to clipboard
public static Integer readIntFromParcel(Parcel in)
从 Parcel 中读取 Integer 类型数据
readListFromParcel
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().
readLongFromParcel
Link copied to clipboard
public static Long readLongFromParcel(Parcel in)
从 Parcel 中读取 Long 类型数据
readMapFromParcel
Link copied to clipboard
public static Map readMapFromParcel(Parcel in)
从 Parcel 中读取 Map 类型数据
writeListToParcel
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.
writeToParcel
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)
向 parcel 中写入 byte 类型数据
public static void writeToParcel(Parcel out, Double obj)
向 parcel 中写入 Double 类型数据
public static void writeToParcel(Parcel out, Float obj)
向 parcel 中写入 Float 类型数据
public static void writeToParcel(Parcel out, Integer obj)
向 parcel 中写入 Integer 类型数据
public static void writeToParcel(Parcel out, Long obj)
向 parcel 中写入 Long 类型数据
public static void writeToParcel(Parcel out, String obj)
向 parcel 中写入 String 类型数据
public static void writeToParcel(Parcel out, Date obj)
向 parcel 中写入 Date 类型数据
public static void writeToParcel(Parcel out, Map obj)
向 parcel 中写入 Map 类型数据