Code example for Parcel

Methods: readInt, readLong

0
		parcel.writeInt(this.type.ordinal()); 
	} 
 
	public static final Parcelable.Creator<FibonacciRequest> CREATOR = new Parcelable.Creator<FibonacciRequest>() { 
		public FibonacciRequest createFromParcel(Parcel in) { 
			long n = in.readLong(); 
			Type type = Type.values()[in.readInt()]; 
			return new FibonacciRequest(n, type); 
		} 
 
		public FibonacciRequest[] newArray(int size) { 
			return new FibonacciRequest[size]; 
		} 
	}; 
}