Interface IpListFetcher

All Known Implementing Classes:
IpListClient
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 IpListFetcher
A client that downloads a list of IP addresses from a given URI.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull Stream<String>
    fetchList(@NonNull URI sourceUri)
    Downloads the list of IP addresses from the given URI.
  • Method Details

    • fetchList

      @Contract(mutates="this,io") @NonNull @NonNull Stream<String> fetchList(@NonNull @NonNull URI sourceUri) throws IOException
      Downloads the list of IP addresses from the given URI.
      Parameters:
      sourceUri - The address of the IP list to download.
      Returns:
      A Stream of the individual lines that the list consists of.
      Throws:
      IOException - If an error occurs while downloading the list.
      UncheckedIOException - If a closeable resource could not be closed after the Stream had been closed.