Interface IURLDownloader

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface IURLDownloader
Callback interface to download data from web. Used e.g. for CRL downloads.
Since:
11.2.0
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
     
    byte[]
    Download the content of the provided URL
  • Method Details

    • downloadURL

      @Nullable byte[] downloadURL(@Nonnull @Nonempty String sURL) throws Exception
      Download the content of the provided URL
      Parameters:
      sURL - The CRL URL to download. Neither null nor empty.
      Returns:
      null if no payload was returned
      Throws:
      Exception - In case of error
    • createDefault

      @Nonnull static IURLDownloader createDefault()
      Returns:
      The default URL downloader using URL.openStream(). Never null.