mobi.cangol.mobile.service.download.DownloadResource Maven / Gradle / Ivy
/**
* Copyright (c) 2013 Cangol
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package mobi.cangol.mobile.service.download;
import java.io.File;
import java.io.Serializable;
import java.util.HashMap;
public class DownloadResource implements Serializable {
//下载的URL
protected String url;
//下载的文件名
protected String fileName;
//文件长度
protected long fileLength;
//已完成长度
protected long completeSize;
//进度
protected int progress;
//速度 b/s
protected long speed;
//开始,暂停,安装,运行
protected int status;
//本地文件更目录
protected String localPath;
//异常说明
protected String exception;
//源文件地址
protected String sourceFile;
//配置地址
protected String confFile;
//下载对象 json 字符串
protected String object;
//唯一标示
protected String key;
protected transient DownloadTask downloadTask;
protected transient HashMap