public class Downloader extends Object
| Constructor and Description |
|---|
Downloader(CdsMojoLogger logger)
Constructs a new
Downloader instance. |
Downloader(List<org.apache.maven.settings.Proxy> proxies,
CdsMojoLogger logger)
Constructs a new
Downloader instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
download(String downloadUrl,
File destination)
Performs a download from given URL.
|
void |
download(String downloadUrl,
File destination,
String userName,
String password)
Performs a download from given URL by using the given credentials
|
public Downloader(CdsMojoLogger logger)
Downloader instance.logger - the required CdsMojoLogger instance.NullPointerException - if any of the required parameters is null.public Downloader(List<org.apache.maven.settings.Proxy> proxies, CdsMojoLogger logger)
Downloader instance.proxies - an optional list of proxieslogger - the required CdsMojoLogger instance.NullPointerException - if any of the required parameters is null.public void download(String downloadUrl, File destination) throws IOException
downloadUrl - the URL to download fromdestination - the destination FileIOException - if download failedNullPointerException - if any of the required parameters is null.public void download(String downloadUrl, File destination, String userName, String password) throws IOException
downloadUrl - the URL to download fromdestination - the destination FileuserName - an optional user namepassword - an optional user passwordIOException - if download failedNullPointerException - if any of the required parameters is null.IllegalArgumentException - If the given download URL isn’t validCopyright © 2021. All rights reserved.