public final class ResourceURIDownloader extends Object implements URIDownloader
resource "scheme"
Here, resource is to be interpreted as a Java resource, exactly
what you would obtain using Class.getResourceAsStream(String).
And in fact, this is what this downloader does: it takes whatever is in
the provided URI's path (using URI.getPath()) and tries to make an
input stream of it. The difference is that an IOException will be
thrown if the resource cannot be found (instead of returning null).
| Modifier and Type | Field and Description |
|---|---|
private static URIDownloader |
instance |
private static Class<ResourceURIDownloader> |
myself |
| Modifier | Constructor and Description |
|---|---|
private |
ResourceURIDownloader() |
private static final Class<ResourceURIDownloader> myself
private static final URIDownloader instance
public static URIDownloader getInstance()
public InputStream fetch(URI source) throws IOException
URIDownloaderfetch in interface URIDownloadersource - the URIInputStreamIOException - unable to fetchCopyright © 2012. All Rights Reserved.