Class DownloadInfo

java.lang.Object
me.hsgamer.hscore.downloader.core.object.DownloadInfo

public final class DownloadInfo extends Object
The download information
  • Constructor Details

    • DownloadInfo

      public DownloadInfo(String name, String fileName, String version, String directLink, Map<String,Object> data, Downloader downloader)
      Create a new download information
      Parameters:
      name - the name
      fileName - the file name
      version - the version
      directLink - the direct link
      data - the data
      downloader - the downloader
    • DownloadInfo

      public DownloadInfo(String name, String fileName, String version, String directLink, Downloader downloader)
      Create a new download information
      Parameters:
      name - the name
      fileName - the file name
      version - the version
      directLink - the direct link
      downloader - the downloader
  • Method Details

    • getName

      public String getName()
      Get the name
      Returns:
      the name
    • getVersion

      public String getVersion()
      Get the version
      Returns:
      the version
    • getFileName

      public String getFileName()
      Get the file name
      Returns:
      the file name
    • getDirectLink

      public String getDirectLink()
      Get the direct link
      Returns:
      the direct link
    • getData

      public Map<String,Object> getData()
      Get the data
      Returns:
      the data
    • isDownloading

      public boolean isDownloading()
      Check if the download is running
      Returns:
      true if the download is running
    • download

      public CompletableFuture<File> download()
      Download the file. If the download is running, it will return the current download task.