public class DirContextURLStreamHandler extends URLStreamHandler
Modifier and Type | Field and Description |
---|---|
protected DirContext |
context
Directory context.
|
Constructor and Description |
---|
DirContextURLStreamHandler() |
DirContextURLStreamHandler(DirContext context) |
Modifier and Type | Method and Description |
---|---|
static void |
bind(ClassLoader cl,
DirContext dirContext)
Binds a directory context to a class loader.
|
static void |
bind(DirContext dirContext)
Binds a directory context to a class loader.
|
static void |
bindThread(DirContext dirContext)
Binds a directory context to a thread.
|
static DirContext |
get()
Get the bound context.
|
static DirContext |
get(ClassLoader cl)
Get the bound context.
|
static DirContext |
get(Thread thread)
Get the bound context.
|
static boolean |
isBound()
Returns true if the thread or the context class loader of the current
thread is bound.
|
protected URLConnection |
openConnection(URL u)
Opens a connection to the object referenced by the
URL
argument. |
static void |
setProtocolHandler()
Set the java.protocol.handler.pkgs system property.
|
protected String |
toExternalForm(URL u)
Override as part of the fix for 36534, to ensure toString is correct.
|
static void |
unbind()
Unbinds a directory context to a class loader.
|
static void |
unbind(ClassLoader cl)
Unbinds a directory context to a class loader.
|
static void |
unbindThread()
Unbinds a directory context to a thread.
|
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, parseURL, sameFile, setURL, setURL
protected DirContext context
public DirContextURLStreamHandler()
public DirContextURLStreamHandler(DirContext context)
protected URLConnection openConnection(URL u) throws IOException
URL
argument.openConnection
in class URLStreamHandler
IOException
protected String toExternalForm(URL u)
toExternalForm
in class URLStreamHandler
public static void setProtocolHandler()
URLStreamHandlerFactory
.public static boolean isBound()
public static void bind(DirContext dirContext)
public static void unbind()
public static void bindThread(DirContext dirContext)
public static void unbindThread()
public static DirContext get()
public static void bind(ClassLoader cl, DirContext dirContext)
public static void unbind(ClassLoader cl)
public static DirContext get(ClassLoader cl)
public static DirContext get(Thread thread)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.