Package com.vaadin.copilot
Class Downloader
java.lang.Object
com.vaadin.copilot.Downloader
-
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamdownload(URL url, com.vaadin.flow.server.frontend.installer.FileDownloader.ProgressListener progressListener) Downloads the given URL and provide the data as a stream.static voiddownloadFile(URL url, File target, com.vaadin.flow.server.frontend.installer.FileDownloader.ProgressListener progressListener) Downloads a file from the given URL to the target file, taking proxies into account.
-
Method Details
-
downloadFile
public static void downloadFile(URL url, File target, com.vaadin.flow.server.frontend.installer.FileDownloader.ProgressListener progressListener) throws URISyntaxException, com.vaadin.flow.server.frontend.installer.DownloadException Downloads a file from the given URL to the target file, taking proxies into account.- Parameters:
url- the URL to download fromtarget- the target file to download toprogressListener- the progress listener to use for tracking the download progress- Throws:
URISyntaxExceptioncom.vaadin.flow.server.frontend.installer.DownloadException
-
download
public static InputStream download(URL url, com.vaadin.flow.server.frontend.installer.FileDownloader.ProgressListener progressListener) throws URISyntaxException, com.vaadin.flow.server.frontend.installer.DownloadException, IOException Downloads the given URL and provide the data as a stream.- Parameters:
url- the URL to download fromprogressListener- the progress listener to use for tracking the download progress- Throws:
URISyntaxExceptioncom.vaadin.flow.server.frontend.installer.DownloadExceptionIOException
-