How to download images in playframework jobs?
- by MrROY
I have a playframework Job class like this:
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) has lots of amazing tools to make things easy.
So i wonder whether there's a way to make the downloading easy and beautiful in play ?