|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
---|---|
ClasspathStreamHandlerFactory | Classloader protocol handler factory created on Oct 9, 2006 |
Handler | URL protocol handler supporting predefined list of classloaders to load the given resource. |
This package provides support for "classpath:" URL protocol handling.
The resource is looked up by a predefined list of classloaders:
Handler
's own classloaderOne can customize this order by setting its own classloader to ClasspathStreamHandlerFactory.primaryClassLoader.
Classloader will be used to load the resource before any method of the URL object is executed.
Simply creating an URL object of "classpath:" protocol would not cause any resource lookups.
Using this protocol handler is possible via two ways:
URLStreamHandlerFactory
main(String[])
or other simillar place:
URL.setURLStreamHandlerFactory( new ClasspathStreamHandlerFactory() );
This method can be called at most once in a given Java Virtual Machine.
The URLStreamHandlerFactory
instance is used to construct a stream protocol handler from a protocol name.
If there is a security manager, this method first calls the security manager's checkSetFactory
method to ensure the operation is allowed. This could result in a SecurityException.
java -Djava.protocol.handler.pkgs=net.sf.fikin.net.protocols ...
If there are other values set to that propery, use "|" as an delimiter.
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |