Code example for Parcel

Methods: readFloat, readInt, readLong, readString

0
	public Date getDateDone() { return dateDone; }
	public String getError() { return error; }
	public Daemon getDaemon() { return daemon; }
	 
	private Torrent(Parcel in) {
		this.id = in.readLong();
		this.hash = in.readString();
		this.name = in.readString();
		this.statusCode = TorrentStatus.getStatus(in.readInt());
		this.locationDir = in.readString();
		 
		this.rateDownload = in.readInt();
		this.rateUpload = in.readInt();
		this.peersGettingFromUs = in.readInt();
		this.peersSendingToUs = in.readInt();
		this.peersConnected = in.readInt();
		this.peersKnown = in.readInt();
		this.eta = in.readInt();
		 
		this.downloadedEver = in.readLong();
		this.uploadedEver = in.readLong();
		this.totalSize = in.readLong();
		this.partDone = in.readFloat();
		this.available = in.readFloat();
		this.label = in.readString();
 
		long lDateAdded = in.readLong();
		this.dateAdded = (lDateAdded == -1)? null: new Date(lDateAdded);
		long lDateDone = in.readLong();
		this.dateDone = (lDateDone == -1)? null: new Date(lDateDone);
		this.error = in.readString();
		this.daemon = Daemon.valueOf(in.readString());
	} 
	 
	public Torrent(long id, String hash, String name, TorrentStatus statusCode, String locationDir, int rateDownload, int rateUpload, 
			int peersGettingFromUs, int peersSendingToUs, int peersConnected, int peersKnown, int eta, 
			long downloadedEver, long uploadedEver, long totalSize, float partDone, float available, String label,