Package fi.moprim.tmd.sdk.utilities
Class ParcelableUtils
- java.lang.Object
-
- fi.moprim.tmd.sdk.utilities.ParcelableUtils
-
public class ParcelableUtils extends java.lang.ObjectHow to use - Make a simple object (POJO) - Create a parcelable in ONE CLICK! http://devk.it/proj/parcelabler/ - Convert to POJO to and from byte[] Example MyParcelable happy = new MyParcelable(); byte[] toByte = ParcelableUtil.marshall(happy); // Save to DB? Send via socket? // ... // Restore from DB? byte[] fromByte = cursor.getBlob(c); MyParcelable happy = ParcelableUtil.unmarshall(fromByte, MyParcelable.CREATOR);
-
-
Constructor Summary
Constructors Constructor Description ParcelableUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]marshall(android.os.Parcelable parcelable)static android.os.Parcelunmarshall(byte[] bytes)static <T extends android.os.Parcelable>
Tunmarshall(byte[] bytes, android.os.Parcelable.Creator<T> creator)
-