Package ai.djl.training.util
Class DownloadUtils
- java.lang.Object
-
- ai.djl.training.util.DownloadUtils
-
public final class DownloadUtils extends java.lang.ObjectA utility class downloads the file from specified url.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddownload(java.lang.String url, java.lang.String output)Downloads a file from specified url.static voiddownload(java.lang.String url, java.lang.String output, ai.djl.util.Progress progress)Downloads a file from specified url.static voiddownload(java.net.URL url, java.nio.file.Path output, ai.djl.util.Progress progress)Downloads a file from specified url.
-
-
-
Method Detail
-
download
public static void download(java.lang.String url, java.lang.String output) throws java.io.IOExceptionDownloads a file from specified url.- Parameters:
url- the url to downloadoutput- the output location- Throws:
java.io.IOException- when IO operation fails in downloading
-
download
public static void download(java.lang.String url, java.lang.String output, ai.djl.util.Progress progress) throws java.io.IOExceptionDownloads a file from specified url.- Parameters:
url- the url to downloadoutput- the output locationprogress- the progress tracker to show download progress- Throws:
java.io.IOException- when IO operation fails in downloading
-
download
public static void download(java.net.URL url, java.nio.file.Path output, ai.djl.util.Progress progress) throws java.io.IOExceptionDownloads a file from specified url.- Parameters:
url- the url to downloadoutput- the output locationprogress- the progress tracker to show download progress- Throws:
java.io.IOException- when IO operation fails in downloading
-
-