public class URIResourceFinder extends Object implements ResourceFinder
Constructor and Description |
---|
URIResourceFinder() |
Modifier and Type | Method and Description |
---|---|
protected void |
add(List<URI> uris)
Adds a list of uris to the end of this class loader.
|
void |
addURI(URI uri) |
protected File |
cacheUri(URI uri) |
protected ResourceLocation |
createResourceLocation(URL codeSource,
File cacheFile) |
void |
destroy() |
URL |
findResource(String resourceName)
Find the resource by name and return URL of it if found.
|
Enumeration<URL> |
findResources(String resourceName)
Find all resources with given name and return enumeration of their URLs.
|
ResourceHandle |
getResource(String resourceName)
Get the resource by name and, if found, open connection to it and return
the
handle of it. |
URI[] |
getURIs() |
public URIResourceFinder()
public void destroy()
public ResourceHandle getResource(String resourceName)
ResourceFinder
handle
of it.getResource
in interface ResourceFinder
resourceName
- the resource namepublic URL findResource(String resourceName)
ResourceFinder
findResource
in interface ResourceFinder
resourceName
- the resource namepublic Enumeration<URL> findResources(String resourceName)
ResourceFinder
findResources
in interface ResourceFinder
resourceName
- the resource nameprotected void add(List<URI> uris)
uris
- the URLs to addprotected File cacheUri(URI uri) throws IOException
IOException
protected ResourceLocation createResourceLocation(URL codeSource, File cacheFile) throws IOException
IOException
elasticsearch-river-jdbc