jcifs.http
Class Handler
java.lang.Object
java.net.URLStreamHandler
jcifs.http.Handler
- Direct Known Subclasses:
- Handler
- public class Handler
- extends java.net.URLStreamHandler
A URLStreamHandler
used to provide NTLM authentication
capabilities to the default HTTP handler. This acts as a wrapper,
handling authentication and passing control to the underlying
stream handler.
Method Summary |
protected int |
getDefaultPort()
Returns the default HTTP port. |
protected java.net.URLConnection |
openConnection(java.net.URL url)
|
static void |
setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory factory)
Sets the URL stream handler factory for the environment. |
Methods inherited from class java.net.URLStreamHandler |
equals, getHostAddress, hashCode, hostsEqual, parseURL, sameFile, setURL, setURL, toExternalForm |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_HTTP_PORT
public static final int DEFAULT_HTTP_PORT
- The default HTTP port (
80
).
- See Also:
- Constant Field Values
Handler
public Handler()
setURLStreamHandlerFactory
public static void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory factory)
- Sets the URL stream handler factory for the environment. This
allows specification of the factory used in creating underlying
stream handlers. This can be called once per JVM instance.
- Parameters:
factory
- The URL stream handler factory.
getDefaultPort
protected int getDefaultPort()
- Returns the default HTTP port.
- Returns:
- An
int
containing the default HTTP port.
openConnection
protected java.net.URLConnection openConnection(java.net.URL url)
throws java.io.IOException
- Throws:
java.io.IOException