Package ai.djl.training.util
Class DownloadUtils
- java.lang.Object
-
- ai.djl.training.util.DownloadUtils
-
public final class DownloadUtils extends java.lang.Object
A utility class downloads the file from specified url.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
download(java.lang.String url, java.lang.String output)
Downloads a file from specified url.static void
download(java.lang.String url, java.lang.String output, ai.djl.util.Progress progress)
Downloads a file from specified url.static void
download(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.IOException
Downloads 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.IOException
Downloads 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.IOException
Downloads 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
-
-