Package io.rong.imlib.model
Class DownloadInfo
-
- All Implemented Interfaces:
public class DownloadInfo保存下载文件信息类
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()获取文件名 voidsetFilePath(String filePath)设置文件名 StringgetInfoPath()voidsetInfoPath(String infoPath)StringgetUrl()获取下载地址 voidsetUrl(String url)设置下载地址 longgetLength()获取文件大小 voidsetLength(long length)设置文件大小 booleanisDownLoading()获取是否正在下载 voidsetDownLoading(boolean downLoading)设置是否正在下载 List<DownloadInfo.SliceInfo>getSliceInfoList()List<String>getSliceInfoPathList()voidwriteToParcel(Parcel dest, int flags)intdescribeContents()voidaddSliceInfo(DownloadInfo.SliceInfo info)voidaddSliceInfoPath(String infoPath)booleanisFinished()获取下载已完成进度 longcurrentFileLength()intcurrentProgress()-
-
Method Detail
-
getTag
String getTag()
-
setTag
void setTag(String tag)
-
getFilePath
String getFilePath()
获取文件名
- Returns:
文件名
-
setFilePath
void setFilePath(String filePath)
设置文件名
- Parameters:
filePath- 文件名
-
getInfoPath
String getInfoPath()
-
setInfoPath
void setInfoPath(String infoPath)
-
getUrl
String getUrl()
获取下载地址
- Returns:
下载地址
-
setUrl
void setUrl(String url)
设置下载地址
- Parameters:
url- 下载地址
-
getLength
long getLength()
获取文件大小
- Returns:
文件大小
-
setLength
void setLength(long length)
设置文件大小
- Parameters:
length- 文件大小
-
isDownLoading
boolean isDownLoading()
获取是否正在下载
- Returns:
是否正在下载
-
setDownLoading
void setDownLoading(boolean downLoading)
设置是否正在下载
- Parameters:
downLoading- 是否正在下载
-
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()
获取下载已完成进度
- Returns:
下载以已完成进度
-
currentFileLength
long currentFileLength()
-
currentProgress
int currentProgress()
-
-
-
-