HttpClient 下载文件

多线程下载 http://blog.csdn.net/jdsjlzx/article/details/6623925

http://hi.baidu.com/%CA%C0%BD%E7%CE%DD%BC%B9/blog/item/8ab692fbf2b1fc204f4aea9c.html
http://llying.iteye.com/blog/486989
http://techpool.iteye.com/blog/620818
http://kukuqiu.iteye.com/blog/343019


使用ant的Get任务也可以下载文件
Get getTask = new Get();
getTask.setProject(getProject());
getTask.setTaskName("bant.get");
getTask.setVerbose(this.verbose);
getTask.setDest(dest);
getTask.setSrc(remoteArtifact);
getTask.execute();

//还可以结合Mkdir任务建立目录
mkdirTask = new Mkdir();
mkdirTask.setProject(getProject());
mkdirTask.setTaskName("fetchTask.mkdir");
mkdirTask.setDir(destdir);
mkdirTask.execute();

你可能感兴趣的:(HttpClient 下载)