use of org.pdown.core.boot.URLHttpDownBootstrapBuilder in project proxyee-down by monkeyWie.
the class AppUtil method fastDownload.
/**
* 使用pdown-core多连接下载http资源
*/
public static HttpDownBootstrap fastDownload(String url, File file, HttpDownCallback callback) throws IOException {
HttpDownBootstrap httpDownBootstrap = new URLHttpDownBootstrapBuilder(url, null, null).callback(callback).downConfig(new HttpDownConfigInfo().setFilePath(file.getParent()).setConnections(64)).response(new HttpResponseInfo().setFileName(file.getName())).proxyConfig(PDownConfigContent.getInstance().get().getProxyConfig()).build();
httpDownBootstrap.start();
return httpDownBootstrap;
}
Aggregations