org.sapia.clazzy
Class ClazzyURLStreamHandlerFactory
java.lang.Object
|
+--org.sapia.clazzy.ClazzyURLStreamHandlerFactory
- All Implemented Interfaces:
- URLStreamHandlerFactory
- public class ClazzyURLStreamHandlerFactory
- extends Object
- implements URLStreamHandlerFactory
A URLStreamHandlerFactory implementation.
An instance of this class can be set on the URL class, by
calling the setURLStreamHandlerFactory() static method:
ClazzyURLStreamHandlerFactory fac = new ClazzyURLStreamHandlerFactory();
URL.setURLStreamHandlerFactory(fac);
The above approach is not recommended: the URL class does not allow setting
the factory more than once per VM. As a workaround, the JDK provides a mechanism
based on package and class naming conventions for factory implementations
(see this link).
Thus, using this framework following the above convention involves setting the following system
property:
-Djava.protocol.handler.pkgs=org.sapia
- Author:
- Yanick Duchesne
- See Also:
ClazzyURLConnection,
JarLoader,
- Copyright:
- Copyright © 2002-2004 Sapia Open Source Software. All Rights Reserved.
- License:
- Read the license.txt file of the jar or visit the
license page at the Sapia OSS web site
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROTOCOL
public static final String PROTOCOL
- See Also:
- Constant Field Values
ClazzyURLStreamHandlerFactory
public ClazzyURLStreamHandlerFactory()
createURLStreamHandler
public URLStreamHandler createURLStreamHandler(String protocol)
- Specified by:
createURLStreamHandler in interface URLStreamHandlerFactory
- See Also:
URLStreamHandlerFactory.createURLStreamHandler(java.lang.String)
Copyright © 2002 Sapia Open Community, Inc. All Rights Reserved.