Class FileDownloader
java.lang.Object
uk.ac.manchester.spinnaker.nmpiexec.utils.FileDownloader
Utilities for downloading a file.
- 
Method SummaryModifier and TypeMethodDescriptionstatic FiledownloadFile(String url, File workingDirectory, String defaultFilename) Downloads a file from a URL.static FiledownloadFile(URL url, File workingDirectory, String defaultFilename) Downloads a file from a URL.
- 
Method Details- 
downloadFilepublic static File downloadFile(URL url, File workingDirectory, String defaultFilename) throws IOException Downloads a file from a URL.- Parameters:
- url- The URL to download the file from
- workingDirectory- The directory to output the file to
- defaultFilename- The name of the file to use if none can be worked out from the URL or headers, or- nullto use a generated name
- Returns:
- The file downloaded
- Throws:
- IOException- If anything goes wrong.
 
- 
downloadFilepublic static File downloadFile(String url, File workingDirectory, String defaultFilename) throws IOException Downloads a file from a URL.- Parameters:
- url- The URL to download the file from
- workingDirectory- The directory to output the file to
- defaultFilename- The name of the file to use if none can be worked out from the URL or headers, or- nullto use a generated name
- Returns:
- The file downloaded
- Throws:
- IOException- If anything goes wrong.
 
 
-