Package io.rong.imlib.model
Class DownloadInfo
-
- All Implemented Interfaces:
public class DownloadInfo
Class for saving download file information
lvhongzhen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
DownloadInfo.SliceInfo
-
Field Summary
Fields Modifier and Type Field Description public String
tag
public String
filePath
public String
infoPath
public String
url
public long
length
public boolean
isDownLoading
public List<DownloadInfo.SliceInfo>
sliceInfoList
public List<String>
sliceInfoPathList
public final static Creator<DownloadInfo>
CREATOR
-
Constructor Summary
Constructors Constructor Description DownloadInfo()
DownloadInfo(String filePath, String url, String tag)
-
Method Summary
Modifier and Type Method Description String
getTag()
void
setTag(String tag)
String
getFilePath()
Get the file name void
setFilePath(String filePath)
Sets the file name String
getInfoPath()
void
setInfoPath(String infoPath)
String
getUrl()
Get Download URL void
setUrl(String url)
Set the download URL long
getLength()
Get file size void
setLength(long length)
Set file size boolean
isDownLoading()
Get whether downloading is in progress void
setDownLoading(boolean downLoading)
Sets whether the download is in progress List<DownloadInfo.SliceInfo>
getSliceInfoList()
List<String>
getSliceInfoPathList()
void
writeToParcel(Parcel dest, int flags)
int
describeContents()
void
addSliceInfo(DownloadInfo.SliceInfo info)
void
addSliceInfoPath(String infoPath)
boolean
isFinished()
Get the download progress long
currentFileLength()
int
currentProgress()
-
-
Method Detail
-
getTag
String getTag()
-
setTag
void setTag(String tag)
-
getFilePath
String getFilePath()
Get the file name
- Returns:
The file name
-
setFilePath
void setFilePath(String filePath)
Sets the file name
- Parameters:
filePath
- The file name
-
getInfoPath
String getInfoPath()
-
setInfoPath
void setInfoPath(String infoPath)
-
getUrl
String getUrl()
Get Download URL
- Returns:
Download URL
-
setUrl
void setUrl(String url)
Set the download URL
- Parameters:
url
- The download URL
-
getLength
long getLength()
Get file size
- Returns:
File size
-
setLength
void setLength(long length)
Set file size
- Parameters:
length
- File size
-
isDownLoading
boolean isDownLoading()
Get whether downloading is in progress
- Returns:
Indicates whether downloading is in progress
-
setDownLoading
void setDownLoading(boolean downLoading)
Sets whether the download is in progress
- Parameters:
downLoading
- Indicates whether the download is in progress
-
getSliceInfoList
List<DownloadInfo.SliceInfo> getSliceInfoList()
-
getSliceInfoPathList
List<String> getSliceInfoPathList()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
describeContents
int describeContents()
-
addSliceInfo
void addSliceInfo(DownloadInfo.SliceInfo info)
-
addSliceInfoPath
void addSliceInfoPath(String infoPath)
-
isFinished
boolean isFinished()
Get the download progress
- Returns:
Indicates the download progress that has been completed
-
currentFileLength
long currentFileLength()
-
currentProgress
int currentProgress()
-
-
-
-