Back to project page C2Framework.
The source code is released under:
Apache License
If you think the Android project C2Framework listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package gaia.c2.content.tools.model; //from ww w .j a v a 2 s . co m import android.os.Parcel; import android.os.Parcelable; import java.io.File; /** * Created by kmr on 4/21/14. */ public class DownloadStatus implements Parcelable { public static final String MIME_TYPE = "x-gaia/download-status"; public final String ticket; public final long downloadedBytes; public final long totalBytes; public final boolean finished; public final File targetFile; public DownloadStatus(String ticket, long downloadedBytes, long totalBytes, boolean finished, File targetFile) { this.ticket = ticket; this.downloadedBytes = downloadedBytes; this.totalBytes = totalBytes; this.finished = finished; this.targetFile = targetFile; } //region parcelable public DownloadStatus(Parcel in) { ticket = in.readString(); downloadedBytes = in.readLong(); totalBytes = in.readLong(); finished = in.readString().equals("y"); targetFile = new File(in.readString()); } @Override public int describeContents() { return this.hashCode(); } @Override public void writeToParcel(Parcel parcel, int i) { parcel.writeString(ticket); parcel.writeLong(downloadedBytes); parcel.writeLong(totalBytes); parcel.writeString(finished ? "y" : "f"); parcel.writeString(targetFile.getAbsolutePath()); } public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { public DownloadStatus createFromParcel(Parcel in) { return new DownloadStatus(in); } public DownloadStatus[] newArray(int size) { return new DownloadStatus[size]; } }; //endregion }