public class ProgressInfo extends Object implements android.os.Parcelable
ProgressInfo 用于存储与进度有关的变量,已实现 Parcelable
Created by JessYan on 07/06/2017 12:09 Contact me Follow me ================================================
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<ProgressInfo> |
CREATOR |
| Modifier | Constructor and Description |
|---|---|
|
ProgressInfo(long id) |
protected |
ProgressInfo(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents() |
long |
getContentLength() |
long |
getCurrentbytes() |
long |
getEachBytes() |
long |
getId() |
long |
getIntervalTime() |
int |
getPercent()
获取百分比,该计算舍去了小数点,如果你想得到更精确的值,请自行计算
|
long |
getSpeed()
获取上传或下载网络速度,单位为byte/s,如果你想得到更精确的值,请自行计算
|
boolean |
isFinish() |
String |
toString() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<ProgressInfo> CREATOR
public ProgressInfo(long id)
protected ProgressInfo(android.os.Parcel in)
public long getCurrentbytes()
public long getContentLength()
public long getIntervalTime()
public long getEachBytes()
public long getId()
public boolean isFinish()
public int getPercent()
public long getSpeed()
public int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelable