I am wondering what the proper way to go about downloading the image from this RUL would be: http://www.hidemyass.com/proxy-list/img/port/7018246/1
The way I tried downl
Thanks Tim, I also found your answer very helpful, just small note: Looks like you haven't closed URL stream. I'm just starting with Groovy, and I've heard that it close steams when exit from closure so we can change code like that:
public void download(def address) {
new File("${address.tokenize('/')[-1]}.png").withOutputStream { out ->
new URL(address).withInputStream { from -> out << from; }
}
}