DownloadTask 里的mFinished 为什么是整个文件的进度?有点想不通
//累加完成进度
mFinished += threadInfo.getFinished();
//开始下载
if (conn.getResponseCode() == HttpStatus.SC_PARTIAL_CONTENT) {
//读取数据
Log.i("DownloadTask", "getresponseconde success");
in = conn.getInputStream();
byte[] buffer = new byte[1024 * 4];
int length = 0;
long time = System.currentTimeMillis();
while ((length = in.read(buffer)) != -1) {
Log.i("DownloadTask", " while loop");
//写入文件
raf.write(buffer, 0, length);
//累加整个文件下载进度 ??????
mFinished += length;