Code example for Parcel

Methods: readByte, readLong, readString

0
         dest.writeString(mName);
         dest.writeByte((byte) (mChecked ? 1 : 0));
      } 
       
      public void readFromParcel(Parcel parcel) {
         mId = parcel.readLong();
         mName = parcel.readString();
         mChecked = parcel.readByte() == 1;
      } 
       
      public static final Parcelable.Creator<Tag> CREATOR =
              new Parcelable.Creator<Tag>() { 
         public Tag createFromParcel(Parcel in) { 
            return new Tag(in); 
         } 
          
         public Tag[] newArray(int size) { 
            return new Tag[size]; 
         } 
      }; 
   }