- java.lang.Object
-
- java.net.URLStreamHandler
-
- org.arakhne.afc.vmutil.resource.Handler
-
public class Handler extends URLStreamHandler
The classHandler
is supporting resource protocol for URL streams. This stream protocol handler knows how to make a connection for "resource" protocol.In most cases, an instance of a
URLStreamHandler
subclass is not created directly by an application. Rather, the first time a protocol name is encountered when constructing aURL
, the appropriate stream protocol handler is automatically loaded.To use this factory, invoke the following code only ONCE time:
URL.setURLStreamHandlerFactory(new HandlerProvider());
.- Since:
- 6.0
- Version:
- 17.0 2020-01-04 14:41:35
- Author:
- Stéphane GALLAND, $Author: willaume$
- See Also:
URLStreamHandler
,HandlerProvider
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- vmutils
-
-
Constructor Summary
Constructors Constructor Description Handler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected URLConnection
openConnection(URL url)
-
Methods inherited from class java.net.URLStreamHandler
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, parseURL, sameFile, setURL, setURL, toExternalForm
-
-
-
-
Method Detail
-
openConnection
protected URLConnection openConnection(URL url) throws IOException
- Specified by:
openConnection
in classURLStreamHandler
- Throws:
IOException
-
-