Package org.esa.snap.core.util.io
Class FileDownloader
java.lang.Object
org.esa.snap.core.util.io.FileDownloader
A utility class for downloading files from the internet.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FiledownloadFile(URL fileUrl, File targetDir, Component parentComponent) Downloads a file from the specified URL to the specified local target directory.
-
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 downloadedtargetDir- the target directoryparentComponent- the parent component to be used by the progress monitor- Throws:
IOException- if an I/O error occurs
-