Package org.infinispan.commons.util
Class ClasspathURLStreamHandler
java.lang.Object
org.infinispan.commons.util.ClasspathURLStreamHandler
- All Implemented Interfaces:
- URLStreamHandlerFactory
A 
URLStreamHandlerFactory which can handle classpath: URI schemes. It will attempt to load resources
 from the thread's context classloader (if it exists) and then fallback to the system classloader. The factory must be
 registered as the URL stream handler factory using the register() method.
 
 On Java 9+, this class is available as a URLStreamHandlerProvider service loader implementation which, if present in
 the boot classpath, will be automatically registered and used by the URL class.
- Since:
- 12.1
- Author:
- Tristan Tarrant <tristan@infinispan.org>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncreateURLStreamHandler(String protocol) static voidregister()Registers this URL handler as the JVM-wide URL stream handler.
- 
Constructor Details- 
ClasspathURLStreamHandlerpublic ClasspathURLStreamHandler()
 
- 
- 
Method Details- 
registerpublic static void register()Registers this URL handler as the JVM-wide URL stream handler. It can only be invoked once in the lifecycle of an application. Refer to theURLdocumentation for restrictions and alternative methods of registration.
- 
createURLStreamHandler- Specified by:
- createURLStreamHandlerin interface- URLStreamHandlerFactory
 
 
-