Code example for Parcel

Methods: writeIntwriteLongwriteString

0
		} 
	} 
	 
	@Override 
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(name);
		if (anon) {
			dest.writeInt(1);
		} else { 
			dest.writeInt(0);
		} 
		 
		if (this.lastSeen == null)
			dest.writeLong(0);
		else 
			dest.writeLong(this.lastSeen.toMillis(true));
	} 
	 
	public static final Parcelable.Creator<Player> CREATOR = new Parcelable.Creator<Player>() {
		public Player createFromParcel(Parcel in) { 
		    return new Player(in);