Android examples for android.os:Parcel
parcelable From Byte Array
//package com.java2s; 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);// w w w .j av a 2 s . c o m T createFromParcel = creator.createFromParcel(obtain); obtain.recycle(); return createFromParcel; } }