Use Apache Common IO’s FileUtils:
import org.apache.commons.io.FileUtils
FileUtils.copyURLToFile(url, f);
The method downloads the content of url and saves it to f.
Use Apache Common IO’s FileUtils:
import org.apache.commons.io.FileUtils
FileUtils.copyURLToFile(url, f);
The method downloads the content of url and saves it to f.