public final class Downloader extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
fetchFile(URL url,
File outputPath)
Retrieves a file from a given URL and saves it to the outputPath.
|
static void |
fetchFile(URL url,
File outputPath,
boolean useProxy)
Retrieves a file from a given URL and saves it to the outputPath.
|
static long |
getLastModified(URL url)
Makes an HTTP Head request to retrieve the last modified date of the given URL.
|
public static void fetchFile(URL url, File outputPath) throws DownloadFailedException
url - the URL of the file to downloadoutputPath - the path to the save the file toDownloadFailedException - is thrown if there is an error downloading the filepublic static void fetchFile(URL url, File outputPath, boolean useProxy) throws DownloadFailedException
url - the URL of the file to downloadoutputPath - the path to the save the file touseProxy - whether to use the configured proxy when downloading filesDownloadFailedException - is thrown if there is an error downloading the filepublic static long getLastModified(URL url) throws DownloadFailedException
url - the URL to retrieve the timestamp fromDownloadFailedException - is thrown if an exception occurs making the HTTP requestCopyright © 2012–2014 OWASP. All rights reserved.