Package io.rong.imlib.model
Class DownloadInfo
-
- All Implemented Interfaces:
public class DownloadInfoClass for saving download file information
lvhongzhen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDownloadInfo.SliceInfo
-
Field Summary
Fields Modifier and Type Field Description public Stringtagpublic StringfilePathpublic StringinfoPathpublic Stringurlpublic longlengthpublic booleanisDownLoadingpublic List<DownloadInfo.SliceInfo>sliceInfoListpublic List<String>sliceInfoPathListpublic 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 StringgetTag()voidsetTag(String tag)StringgetFilePath()Get the file name voidsetFilePath(String filePath)Sets the file name StringgetInfoPath()voidsetInfoPath(String infoPath)StringgetUrl()Get Download URL voidsetUrl(String url)Set the download URL longgetLength()Get file size voidsetLength(long length)Set file size booleanisDownLoading()Get whether downloading is in progress voidsetDownLoading(boolean downLoading)Sets whether the download is in progress List<DownloadInfo.SliceInfo>getSliceInfoList()List<String>getSliceInfoPathList()voidwriteToParcel(Parcel dest, int flags)intdescribeContents()voidaddSliceInfo(DownloadInfo.SliceInfo info)voidaddSliceInfoPath(String infoPath)booleanisFinished()Get the download progress longcurrentFileLength()intcurrentProgress()-
-
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()
-
-
-
-