| Package | Description |
|---|---|
| java.lang | |
| java.net |
| Modifier and Type | Method and Description |
|---|---|
protected URL |
ClassLoader.findResource(String name)
Finds the resource with the given name.
|
URL |
ClassLoader.getResource(String name)
Finds the resource with the given name.
|
URL |
Class.getResource(String name)
Finds a resource with a given name.
|
static URL |
ClassLoader.getSystemResource(String name)
Find a resource of the specified name from the search path used to load
classes.
|
| Modifier and Type | Method and Description |
|---|---|
protected Enumeration<URL> |
ClassLoader.findResources(String name)
Returns an enumeration of
URL objects
representing all the resources with the given name. |
Enumeration<URL> |
ClassLoader.getResources(String name)
Finds all the resources with the given name.
|
static Enumeration<URL> |
ClassLoader.getSystemResources(String name)
Finds all resources of the specified name from the search path used to
load classes.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
URLStreamHandler.equals(URL u1,
URL u2)
Provides the default equals calculation.
|
protected int |
URLStreamHandler.hashCode(URL u)
Provides the default hash calculation.
|
protected boolean |
URLStreamHandler.hostsEqual(URL u1,
URL u2)
Compares the host components of two URLs.
|
protected abstract URLConnection |
URLStreamHandler.openConnection(URL u)
Opens a connection to the object referenced by the
URL argument. |
protected void |
URLStreamHandler.parseURL(URL u,
String spec,
int start,
int limit)
Parses the string representation of a
URL into a
URL object. |
boolean |
URL.sameFile(URL other)
Compares two URLs, excluding the fragment component.
|
protected boolean |
URLStreamHandler.sameFile(URL u1,
URL u2)
Compare two urls to see whether they refer to the same file,
i.e., having the same protocol, host, port, and path.
|
protected void |
URLStreamHandler.setURL(URL u,
String protocol,
String host,
int port,
String file,
String ref)
Deprecated.
Use setURL(URL, String, String, int, String, String, String,
String);
|
protected void |
URLStreamHandler.setURL(URL u,
String protocol,
String host,
int port,
String authority,
String userInfo,
String path,
String query,
String ref)
Sets the fields of the
URL argument to the indicated values. |
protected String |
URLStreamHandler.toExternalForm(URL u)
Converts a
URL of a specific protocol to a
String. |
| Constructor and Description |
|---|
URL(URL context,
String spec)
Creates a URL by parsing the given spec within a specified context.
|
URL(URL context,
String spec,
URLStreamHandler handler)
Creates a URL by parsing the given spec with the specified handler
within a specified context.
|
Copyright © 2025 API Design. All Rights Reserved.