【发布时间】:2012-03-18 17:59:35
【问题描述】:
我有一个这样的 playframework Job 类:
public class ImageDownloader extends Job {
private String[] urls;
private String dir;
public ImageDownloader(){}
public ImageDownloader(String[] urls,String dir){
this.urls = urls;
this.dir = dir;
}
@Override
public void doJob() throws Exception {
if(urls!=null && urls.length > 0){
for (int i = 0; i < urls.length; i++) {
String url = urls[i];
//Dowloading
}
}
}
}
Play(1.2.4) 有很多很棒的工具可以让事情变得简单。
所以我想知道是否有办法让下载变得简单而美观?
【问题讨论】:
标签: java asynchronous concurrency playframework download