Here you can find the source of parcelableFromByteArray( Parcelable.Creator
public static <T extends Parcelable> T parcelableFromByteArray( Parcelable.Creator<T> creator, byte[] byteArray)
//package com.java2s; //License from project: Apache License import android.os.Parcel; import android.os.Parcelable; public class Main { public static <T extends Parcelable> T parcelableFromByteArray( Parcelable.Creator<T> creator, byte[] byteArray) { Parcel obtain = Parcel.obtain(); obtain.unmarshall(byteArray, 0, byteArray.length); obtain.setDataPosition(0);/*from w w w .j a va 2 s .c o m*/ T createFromParcel = creator.createFromParcel(obtain); obtain.recycle(); return createFromParcel; } }