Class DownloadUtils

java.lang.Object
ai.djl.training.util.DownloadUtils

public final class DownloadUtils extends Object
A utility class downloads the file from specified url.
  • Method Details

    • download

      public static void download(String url, String output) throws IOException
      Downloads a file from specified url.
      Parameters:
      url - the url to download
      output - the output location
      Throws:
      IOException - when IO operation fails in downloading
    • download

      public static void download(String url, String output, ai.djl.util.Progress progress) throws IOException
      Downloads a file from specified url.
      Parameters:
      url - the url to download
      output - the output location
      progress - the progress tracker to show download progress
      Throws:
      IOException - when IO operation fails in downloading
    • download

      public static void download(URL url, Path output, ai.djl.util.Progress progress) throws IOException
      Downloads a file from specified url.
      Parameters:
      url - the url to download
      output - the output location
      progress - the progress tracker to show download progress
      Throws:
      IOException - when IO operation fails in downloading