InputStream in = new URL(FILE_URL).openStream();Files.copy(in, Paths.get(FILE_NAME), StandardCopyOption.REPLACE_EXISTING);