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.
A client that downloads a list of IP addresses from a given
URI.- See Also:
-
Method Summary
-
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 givenURI.- Parameters:
sourceUri- The address of the IP list to download.- Returns:
- A
Streamof 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.
-