com.github.fge.jsonschema.core.load.download
Class DefaultURIDownloader
java.lang.Object
com.github.fge.jsonschema.core.load.download.DefaultURIDownloader
- All Implemented Interfaces:
- URIDownloader
public final class DefaultURIDownloader
- extends Object
- implements URIDownloader
Default URI downloader
URL's API doc guarantees that an implementation can handle the
following schemes: http, https, ftp, file
and jar. This is what this downloader uses.
- See Also:
URL.openStream()
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static URIDownloader getInstance()
fetch
public InputStream fetch(URI source)
throws IOException
- Description copied from interface:
URIDownloader
- Fetch the content at a given URI
- Specified by:
fetch in interface URIDownloader
- Parameters:
source - the URI
- Returns:
- an
InputStream
- Throws:
IOException - unable to find an input stream