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 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()
获取文件名 void
setFilePath(String filePath)
设置文件名 String
getInfoPath()
void
setInfoPath(String infoPath)
String
getUrl()
获取下载地址 void
setUrl(String url)
设置下载地址 long
getLength()
获取文件大小 void
setLength(long length)
设置文件大小 boolean
isDownLoading()
获取是否正在下载 void
setDownLoading(boolean downLoading)
设置是否正在下载 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()
获取下载已完成进度 long
currentFileLength()
int
currentProgress()
-
-
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()
-
-
-
-