public class Handler extends URLStreamHandler implements IJarURLStreamHandler
URLStreamHandler
.
This class must be named Handler
for the default system
handler search mechanism to function. Normally you will not use this class
directly; NpJarURLStreamHandlerFactory
documents how to
globally install npjar support. However, you can employ NpJar
using just this class:
Handler npJar = new Handler(...); URL url = new URL (..., npJar);
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG
Debug flag, default false.
|
Constructor and Description |
---|
Handler()
Construct a new
Handler . |
Handler(NpJarFile jarFile)
Handler construction for an open Jar.
|
Modifier and Type | Method and Description |
---|---|
IJarFile |
getJarFile()
Gets the IJarFile from the handler.
|
protected URLConnection |
openConnection(URL url)
Open an
NpJarURLConnection to the specified URL. |
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, parseURL, sameFile, setURL, setURL, toExternalForm
public Handler()
Handler
.public Handler(NpJarFile jarFile)
jarFile
- The Jar file to use.public IJarFile getJarFile()
getJarFile
in interface IJarURLStreamHandler
null
if handler did not specify an IJarFile.protected URLConnection openConnection(URL url) throws IOException
NpJarURLConnection
to the specified URL.openConnection
in class URLStreamHandler
url
- The URL
to which to connect.IOException
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.