public class UrlResourceFinder extends java.lang.Object implements ResourceFinder
| Constructor and Description |
|---|
UrlResourceFinder() |
UrlResourceFinder(java.net.URL[] urls) |
| Modifier and Type | Method and Description |
|---|---|
void |
addUrl(java.net.URL url) |
protected void |
addUrls(java.util.List<java.net.URL> urls)
Adds a list of urls to the end of this class loader.
|
protected void |
addUrls(java.net.URL[] urls)
Adds an array of urls to the end of this class loader.
|
protected java.io.File |
cacheUrl(java.net.URL url) |
protected ResourceLocation |
createResourceLocation(java.net.URL codeSource,
java.io.File cacheFile) |
void |
destroy() |
java.net.URL |
findResource(java.lang.String resourceName)
Find the resource by name and return URL of it if found.
|
java.util.Enumeration |
findResources(java.lang.String resourceName)
Find all resources with given name and return enumeration of their URLs.
|
ResourceHandle |
getResource(java.lang.String resourceName)
Get the resource by name and, if found, open connection to it and return
the
handle of it. |
java.net.URL[] |
getUrls() |
public UrlResourceFinder()
public UrlResourceFinder(java.net.URL[] urls)
public void destroy()
public ResourceHandle getResource(java.lang.String resourceName)
ResourceFinderhandle of it.getResource in interface ResourceFinderresourceName - the resource namepublic java.net.URL findResource(java.lang.String resourceName)
ResourceFinderfindResource in interface ResourceFinderresourceName - the resource namepublic java.util.Enumeration findResources(java.lang.String resourceName)
ResourceFinderfindResources in interface ResourceFinderresourceName - the resource namepublic void addUrl(java.net.URL url)
public java.net.URL[] getUrls()
protected void addUrls(java.net.URL[] urls)
urls - the URLs to addprotected void addUrls(java.util.List<java.net.URL> urls)
urls - the URLs to addprotected java.io.File cacheUrl(java.net.URL url)
throws java.io.IOException
java.io.IOExceptionprotected ResourceLocation createResourceLocation(java.net.URL codeSource, java.io.File cacheFile) throws java.io.IOException
java.io.IOExceptionCopyright © 2004-2015 The Apache Software Foundation. All Rights Reserved.