| java.lang.Object sun.misc.URLClassPath
URLClassPath | public class URLClassPath (Code) | | This class is used to maintain a search path of URLs for loading classes
and resources from both JAR files and directories.
author: David Connelly version: 1.62, 03/09/00 |
USER_AGENT_JAVA_VERSION | final static String USER_AGENT_JAVA_VERSION(Code) | | |
URLClassPath | public URLClassPath(URL[] urls, URLStreamHandlerFactory factory)(Code) | | Creates a new URLClassPath for the given URLs. The URLs will be
searched in the order specified for classes and resources. A URL
ending with a '/' is assumed to refer to a directory. Otherwise,
the URL is assumed to refer to a JAR file.
Parameters: urls - the directory and JAR file URLs to search for classesand resources Parameters: factory - the URLStreamHandlerFactory to use when creating new URLs |
URLClassPath | public URLClassPath(URL[] urls)(Code) | | |
addURL | public void addURL(URL url)(Code) | | Appends the specified URL to the search path of directory and JAR
file URLs from which to load classes and resources.
|
findResource | public URL findResource(String name, boolean check)(Code) | | Finds the resource with the specified name on the URL search path
or null if not found or security check fails.
Parameters: name - the name of the resource Parameters: check - whether to perform a security check a URL for the resource, or null if the resource could not be found. |
findResources | public Enumeration findResources(String name, boolean check)(Code) | | Finds all resources on the URL search path with the given name.
Returns an enumeration of the URL objects.
Parameters: name - the resource name an Enumeration of all the urls having the specified name |
getResource | public Resource getResource(String name, boolean check)(Code) | | Finds the first Resource on the URL search path which has the specified
name. Returns null if no Resource could be found.
Parameters: name - the name of the Resource Parameters: check - whether to perform a security check the Resource, or null if not found |
getResources | public Enumeration getResources(String name, boolean check)(Code) | | Finds all resources on the URL search path with the given name.
Returns an enumeration of the Resource objects.
Parameters: name - the resource name an Enumeration of all the resources having the specified name |
getURLs | public URL[] getURLs()(Code) | | Returns the original search path of URLs.
|
pathToURLs | public static URL[] pathToURLs(String path)(Code) | | Convert class path specification into an array of file URLs.
The path of the file is encoded before conversion into URL
form so that reserved characters can safely appear in the path.
|
|
|