Class DownloadUtils

java.lang.Object
uk.ac.ebi.utils.io.DownloadUtils

public class DownloadUtils extends Object
A class to make download of files easier.
  • Field Details

    • TMP_LOCATION

      public static final String TMP_LOCATION
    • DOWNLOAD_FILE_LOC

      public static final String DOWNLOAD_FILE_LOC
    • XML_EXT

      public static final String XML_EXT
      See Also:
  • Constructor Details

    • DownloadUtils

      public DownloadUtils()
  • Method Details

    • downloadFile

      public static 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.
      Parameters:
      urlToDownload - - a URL containing the file to download
      downloadLocation - - a place in which to store the downloaded file.
      Returns:
      boolean value to indicate success (true) or failure (false)
    • deleteFile

      public static boolean deleteFile(String file)
      Remove a file given an absolute file path
      Parameters:
      file - - String representing the absolute location of the file to be removed.