Grails

Using Category in groovy

In one of my projects, I needed to save file from a particular url. I found a groovier way of doing this using category. [java] class FileBinaryCategory { def static leftShift(File file, URL url) { url.withInputStream {is -> file.withOutputStream {os -> def bs = new...

by raj
Tag: download-file
30-Nov-2012