public class FileDownloadModel
extends java.lang.Object
implements android.os.Parcelable
FileDownloadDatabase| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONNECTION_COUNT |
static android.os.Parcelable.Creator<FileDownloadModel> |
CREATOR |
static int |
DEFAULT_CALLBACK_PROGRESS_TIMES |
static java.lang.String |
ERR_MSG |
static java.lang.String |
ETAG |
static java.lang.String |
FILENAME |
static java.lang.String |
ID |
static java.lang.String |
PATH |
static java.lang.String |
PATH_AS_DIRECTORY |
static java.lang.String |
SOFAR |
static java.lang.String |
STATUS |
static java.lang.String |
TOTAL |
static int |
TOTAL_VALUE_IN_CHUNKED_RESOURCE |
static java.lang.String |
URL |
| Modifier | Constructor and Description |
|---|---|
|
FileDownloadModel() |
protected |
FileDownloadModel(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteTargetFile() |
void |
deleteTaskFiles() |
void |
deleteTempFile() |
int |
describeContents() |
int |
getConnectionCount() |
java.lang.String |
getErrMsg() |
java.lang.String |
getETag() |
java.lang.String |
getFilename() |
int |
getId() |
java.lang.String |
getPath()
Get the path user set from
BaseDownloadTask.setPath(String) |
long |
getSoFar() |
byte |
getStatus() |
java.lang.String |
getTargetFilePath()
Get the finally target file path is used for store the download file.
|
java.lang.String |
getTempFilePath() |
long |
getTotal() |
java.lang.String |
getUrl() |
void |
increaseSoFar(long increaseBytes) |
boolean |
isChunked() |
boolean |
isLargeFile() |
boolean |
isPathAsDirectory() |
void |
resetConnectionCount()
reset the connection count to default value: 1.
|
void |
setConnectionCount(int connectionCount) |
void |
setErrMsg(java.lang.String errMsg) |
void |
setETag(java.lang.String eTag) |
void |
setFilename(java.lang.String filename) |
void |
setId(int id) |
void |
setPath(java.lang.String path,
boolean pathAsDirectory) |
void |
setSoFar(long soFar) |
void |
setStatus(byte status) |
void |
setTotal(long total) |
void |
setUrl(java.lang.String url) |
android.content.ContentValues |
toContentValues() |
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final int TOTAL_VALUE_IN_CHUNKED_RESOURCE
public static final int DEFAULT_CALLBACK_PROGRESS_TIMES
public static final java.lang.String ID
public static final java.lang.String URL
public static final java.lang.String PATH
public static final java.lang.String PATH_AS_DIRECTORY
public static final java.lang.String FILENAME
public static final java.lang.String STATUS
public static final java.lang.String SOFAR
public static final java.lang.String TOTAL
public static final java.lang.String ERR_MSG
public static final java.lang.String ETAG
public static final java.lang.String CONNECTION_COUNT
public static final android.os.Parcelable.Creator<FileDownloadModel> CREATOR
public FileDownloadModel()
protected FileDownloadModel(android.os.Parcel in)
public void setId(int id)
public void setUrl(java.lang.String url)
public void setPath(java.lang.String path,
boolean pathAsDirectory)
public void setStatus(byte status)
public void setSoFar(long soFar)
public void increaseSoFar(long increaseBytes)
public void setTotal(long total)
public int getId()
public java.lang.String getUrl()
public java.lang.String getPath()
BaseDownloadTask.setPath(String)BaseDownloadTask.setPath(String)getTargetFilePath()public java.lang.String getTargetFilePath()
path、pathAsDirectory、filename.
Why getPath() may be not equal to getTargetFilePath()? this case only occurred
when the isPathAsDirectory() is true, on this scenario the
getPath() is directory, and the getTargetFilePath() is 'directory + "/" + filename'.public java.lang.String getTempFilePath()
public byte getStatus()
public long getSoFar()
public long getTotal()
public boolean isChunked()
public java.lang.String getETag()
public void setETag(java.lang.String eTag)
public java.lang.String getErrMsg()
public void setErrMsg(java.lang.String errMsg)
public void setFilename(java.lang.String filename)
public boolean isPathAsDirectory()
public java.lang.String getFilename()
public void setConnectionCount(int connectionCount)
public int getConnectionCount()
public void resetConnectionCount()
public android.content.ContentValues toContentValues()
public boolean isLargeFile()
public void deleteTaskFiles()
public void deleteTempFile()
public void deleteTargetFile()
public java.lang.String toString()
toString in class java.lang.Objectpublic int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelable