public class Handler
extends java.net.URLStreamHandler
registered to support archive access protocol.
It uses ArchiveURLConnection to implement the connection.| Constructor and Description |
|---|
Handler()
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
Registers this handler and interprets each argument as URL to be opened, read in, and written out to System.out.
|
protected java.net.URLConnection |
openConnection(java.net.URL url)
Returns a new
ArchiveURLConnection. |
protected void |
parseURL(java.net.URL url,
java.lang.String specification,
int start,
int limit)
Overrides parsing the URL to validate constraints on well formed archive syntax.
|
static void |
register()
Registers this class.
|
public static void register()
URLStreamHandler
in a package called named xyz in a package of your choosing,
and then registering that chosen prefix package name
in the system property for "java.protocol.handler.pkgs",
which is an "|" separated list of package prefixes to search for handlers.public static void main(java.lang.String[] args)
throws java.io.IOException
args - URLs to open, read, and write to System.outjava.io.IOException - if there are problems opening or reading from the URLs, or writing to System.out.protected void parseURL(java.net.URL url,
java.lang.String specification,
int start,
int limit)
parseURL in class java.net.URLStreamHandlerURLStreamHandler.parseURL(java.net.URL, java.lang.String, int, int)protected java.net.URLConnection openConnection(java.net.URL url)
throws java.io.IOException
ArchiveURLConnection.openConnection in class java.net.URLStreamHandlerjava.io.IOExceptionCopyright © 2018. Licensed under the Eclipse Public License v1.0. All rights reserved.
Submit a bug or feature