code: public void fetchFile(URL url, File outputPath, boolean useProxy) throws DownloadFailedException {
          try (HttpResourceConnection conn = new HttpResourceConnection(settings, useProxy);
                  OutputStream out = new FileOutputStream(outputPath)) {
              final InputStream in = conn.fetch(url);
              IOUtils.copy(in, out);
          } catch (IOException ex) {
              final String msg = format("Download failed, unable to copy '%s' to '%s'", url.toString(), outputPath.getAbsolutePath());
              throw new DownloadFailedException(msg, ex);
          }
      }
docs: Retrieves a file from a given URL and saves it to the outputPath.
  
  @param url the URL of the file to download
  @param outputPath the path to the save the file to
  @param useProxy whether to use the configured proxy when downloading
  files
  @throws org.owasp.dependencycheck.utils.DownloadFailedException is thrown
  if there is an error downloading the file