Package org.esa.snap.core.util.io
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 Summary
Constructors Constructor Description FileDownloader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static File
downloadFile(URL fileUrl, File targetDir, Component parentComponent)
Downloads a file from the specified URL to the specified local target directory.
-
-
-
Method Detail
-
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
-
-