JavaScript is disabled on your browser.
gnu.text
Class ResourceStreamHandler
- java.lang.Object
-
- java.net.URLStreamHandler
-
- gnu.text.ResourceStreamHandler
-
public class ResourceStreamHandler
extends java.net.URLStreamHandler
Handler for "class-resource:" URLs.
These are "indirect URLs" implemented using ClassLoader.getResource().
Their syntax is: either:
class-resource:/PACKAGE/CLASS or
class-resource:/CLASS or
class-resource:/PACKAGE/RESOURCE or
class-resource:/RESOURCE.
The former two are "base URLs" which need to be resolved.
The latter two are resolved resource names.
Levels of a PACKAGE are separated by '.', not '/'.
-
-
Method Summary
All Methods
| Modifier and Type |
Method and Description |
static java.net.URL |
makeURL (java.lang.Class clas) |
java.net.URLConnection |
openConnection (java.net.URL u) |
-
Methods inherited from class java.net.URLStreamHandler
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, parseURL, sameFile, setURL, setURL, toExternalForm
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Field Detail
-
CLASS_RESOURCE_URI_PREFIX
public static final java.lang.String CLASS_RESOURCE_URI_PREFIX
A special URI-scheme for accessing resources relative to a ClassLoader.
The resource is found using ClassLoader's getResource method.
The actual ClassLoader is found using getClassLoaderForURI.
- See Also:
- Constant Field Values
-
CLASS_RESOURCE_URI_PREFIX_LENGTH
public static final int CLASS_RESOURCE_URI_PREFIX_LENGTH
The length of CLASS_RESOURCE_URI_PREFIX, including ":/".
- See Also:
- Constant Field Values