Package org.wikidata.wdtk.util
Interface WebResourceFetcher
-
- All Known Implementing Classes:
WebResourceFetcherImpl
public interface WebResourceFetcherInterface to access files on the Web. Mock implementations can be used for testing without Web access.- Author:
- Markus Kroetzsch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStreamgetInputStreamForUrl(String urlString)Returns an InputStream for the document at the given URL.
-
-
-
Method Detail
-
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
-
-