Class ResourceDownloader

java.lang.Object
ml.karmaconfigs.api.common.ResourceDownloader

public final class ResourceDownloader extends Object
Karma resource downloader
  • Constructor Details

    • ResourceDownloader

      public ResourceDownloader(File destination, String _url)
      Initialize the resource downloader
      Parameters:
      destination - the resource destination
      _url - the resource download URL
  • Method Details

    • toCache

      public static ResourceDownloader toCache(KarmaSource source, String fileName, String downloadURL, String... sub)
      Download something to cache
      Parameters:
      source - the resource source
      fileName - the destination file name
      downloadURL - the resource download URL
      sub - the resource path
      Returns:
      a new resource download instance
    • download

      public void download()
      Download the resource
    • getDestFile

      public File getDestFile()
      Get the resource destination file
      Returns:
      the resource destination file