Package com.google.common.jimfs
Class Handler
java.lang.Object
java.net.URLStreamHandler
com.google.common.jimfs.Handler
URLStreamHandler
implementation for jimfs. Named Handler
so that the class can be
found by Java as described in the documentation for URL
.
This class is only public because it is necessary for Java to find it. It is not intended to be used directly.
- Since:
- 1.1
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHandler()
Deprecated.Not intended to be called directly; this class is only for use by Java itself. -
Method Summary
Modifier and TypeMethodDescriptionprotected @Nullable InetAddress
getHostAddress
(URL url) protected URLConnection
openConnection
(URL url) (package private) static void
register()
Registers this handler by adding the packagecom.google.common
to the system property"java.protocol.handler.pkgs"
.(package private) static void
register
(Class<? extends URLStreamHandler> handlerClass) Generic method that would allow registration of any properly placedHandler
class.Methods inherited from class java.net.URLStreamHandler
equals, getDefaultPort, hashCode, hostsEqual, openConnection, parseURL, sameFile, setURL, setURL, toExternalForm
-
Field Details
-
JAVA_PROTOCOL_HANDLER_PACKAGES
- See Also:
-
-
Constructor Details
-
Handler
Deprecated.Not intended to be called directly; this class is only for use by Java itself.
-
-
Method Details
-
register
static void register()Registers this handler by adding the packagecom.google.common
to the system property"java.protocol.handler.pkgs"
. Java will then look for this class in thejimfs
(the name of the protocol) package ofcom.google.common
.- Throws:
SecurityException
- if the system property that needs to be set to register this handler can't be read or written.
-
register
Generic method that would allow registration of any properly placedHandler
class. -
openConnection
- Specified by:
openConnection
in classURLStreamHandler
- Throws:
IOException
-
getHostAddress
- Overrides:
getHostAddress
in classURLStreamHandler
-