Class ParcelableUtils


  • public class ParcelableUtils
    extends java.lang.Object
    How 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.Parcel unmarshall​(byte[] bytes)  
      static <T extends android.os.Parcelable>
      T
      unmarshall​(byte[] bytes, android.os.Parcelable.Creator<T> creator)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ParcelableUtils

        public ParcelableUtils()
    • Method Detail

      • marshall

        public static byte[] marshall​(android.os.Parcelable parcelable)
      • unmarshall

        public static <T extends android.os.Parcelable> T unmarshall​(byte[] bytes,
                                                                     android.os.Parcelable.Creator<T> creator)
      • unmarshall

        public static android.os.Parcel unmarshall​(byte[] bytes)