org.apache.xbean.classloader
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 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)
ResourceFinder
handle
of it.getResource
in interface ResourceFinder
resourceName
- the resource namepublic java.net.URL findResource(java.lang.String resourceName)
ResourceFinder
findResource
in interface ResourceFinder
resourceName
- the resource namepublic java.util.Enumeration findResources(java.lang.String resourceName)
ResourceFinder
findResources
in interface ResourceFinder
resourceName
- 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 urls)
urls
- the URLs to addprotected java.io.File cacheUrl(java.net.URL url) throws java.io.IOException
java.io.IOException
protected ResourceLocation createResourceLocation(java.net.URL codeSource, java.io.File cacheFile) throws java.io.IOException
java.io.IOException
Copyright © 2005-2016. All Rights Reserved.