Class FileDownloader

java.lang.Object
org.esa.snap.core.util.io.FileDownloader

public class FileDownloader extends Object
A utility class for downloading files from the internet.
  • Constructor Details

    • FileDownloader

      public FileDownloader()
  • Method Details

    • downloadFile

      public static File downloadFile(URL fileUrl, File targetDir, Component parentComponent) throws IOException
      Downloads a file from the specified URL to the specified local target directory. The method uses a Swing progress monitor to visualize the download process.
      Parameters:
      fileUrl - the URL of the file to be downloaded
      targetDir - the target directory
      parentComponent - the parent component to be used by the progress monitor
      Throws:
      IOException - if an I/O error occurs