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 InetAddressgetHostAddress(URL url) protected URLConnectionopenConnection(URL url) (package private) static voidregister()Registers this handler by adding the packagecom.google.commonto the system property"java.protocol.handler.pkgs".(package private) static voidregister(Class<? extends URLStreamHandler> handlerClass) Generic method that would allow registration of any properly placedHandlerclass.Methods inherited from class 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.commonto 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 placedHandlerclass. -
openConnection
- Specified by:
openConnectionin classURLStreamHandler- Throws:
IOException
-
getHostAddress
- Overrides:
getHostAddressin classURLStreamHandler
-