Class Downloader

java.lang.Object
com.vaadin.copilot.Downloader

public class Downloader extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    download(URL url, com.vaadin.flow.server.frontend.installer.FileDownloader.ProgressListener progressListener)
    Downloads the given URL and provide the data as a stream.
    static void
    downloadFile(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 from
      target - the target file to download to
      progressListener - the progress listener to use for tracking the download progress
      Throws:
      URISyntaxException
      com.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 from
      progressListener - the progress listener to use for tracking the download progress
      Throws:
      URISyntaxException
      com.vaadin.flow.server.frontend.installer.DownloadException
      IOException