new File("downloadedimg.jpg").withOutputStream { os -> new URL("http://server/img_uri.jpg").withInputStream { is -> os << is } }