Interface WebResourceFetcher

All Known Implementing Classes:
MockWebResourceFetcher, WebResourceFetcherImpl

public interface WebResourceFetcher
Interface to access files on the Web. Mock implementations can be used for testing without Web access.
Author:
Markus Kroetzsch
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an InputStream for the document at the given URL.
  • Method Details

    • getInputStreamForUrl

      InputStream getInputStreamForUrl(String urlString) throws IOException
      Returns an InputStream for the document at the given URL. This can be used for downloading. The stream should be closed after use.
      Parameters:
      urlString - the URL of the document
      Returns:
      InputStream for the requested document
      Throws:
      IOException - if the document at the URL could not be opened or the URL was invalid