Package uk.ac.ebi.utils.io
Class DownloadUtils
java.lang.Object
uk.ac.ebi.utils.io.DownloadUtils
A class to make download of files easier.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
deleteFile
(String file) Remove a file given an absolute file pathstatic boolean
downloadFile
(String urlToDownload, String downloadLocation) Provided a URL containing a page/file to download and a download location, will download and create the file.
-
Field Details
-
TMP_LOCATION
-
DOWNLOAD_FILE_LOC
-
XML_EXT
- See Also:
-
-
Constructor Details
-
DownloadUtils
public DownloadUtils()
-
-
Method Details
-
downloadFile
Provided a URL containing a page/file to download and a download location, will download and create the file.- Parameters:
urlToDownload
- - a URL containing the file to downloaddownloadLocation
- - a place in which to store the downloaded file.- Returns:
- boolean value to indicate success (true) or failure (false)
-
deleteFile
Remove a file given an absolute file path- Parameters:
file
- - String representing the absolute location of the file to be removed.
-