public void resumeDownload(DownloadInfo downloadInfo, final RequestCallBack<File> callback) throws DbException { HttpUtils http = new HttpUtils(); http.configRequestThreadPoolSize(maxDownloadThread); HttpHandler<File> handler = http.download( downloadInfo.getDownloadUrl(), downloadInfo.getFileSavePath(), downloadInfo.isAutoResume(), downloadInfo.isAutoRename(), new ManagerCallBack(downloadInfo, callback)); downloadInfo.setHandler(handler); downloadInfo.setState(handler.getState()); db.saveOrUpdate(downloadInfo); }
public void resumeDownload(DownloadInfo downloadInfo, final RequestCallBack<File> callback) throws Exception { HttpUtils http = new HttpUtils(); // http.configRequestThreadPoolSize(maxDownloadThread); HttpHandler<File> handler = http.download( downloadInfo.getDownloadUrl(), downloadInfo.getFileSavePath(), downloadInfo.isAutoResume(), downloadInfo.isAutoRename(), new ManagerCallBack(downloadInfo, callback)); downloadInfo.setHandler(handler); downloadInfo.setState(handler.getState()); Log.e("TAG", "--resumeDownload downloadInfo=" + downloadInfo.toString()); infoImpl.saveOrUpdate( downloadInfo, "downloadUrl=?", new String[] {downloadInfo.getDownloadUrl()}); }