Package org.eclipse.emf.common.archive
Class Handler
java.lang.Object
java.net.URLStreamHandler
org.eclipse.emf.common.archive.Handler
A URL stream handler that can be
registered to support archive access protocol.
It uses ArchiveURLConnection to implement the connection.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidRegisters this handler and interprets each argument as URL to be opened, read in, and written out to System.out.protected URLConnectionopenConnection(URL url) Returns a newArchiveURLConnection.protected voidOverrides parsing the URL to validate constraints on well formed archive syntax.static voidregister()Registers this class.Methods inherited from class java.net.URLStreamHandler
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, sameFile, setURL, setURL, toExternalForm
-
Constructor Details
-
Handler
public Handler()Creates an instance.
-
-
Method Details
-
register
public static void register()Registers this class. A handler for protocol "xyz" is registered by providing a class named Handler implementingURLStreamHandlerin 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. -
main
Registers this handler and interprets each argument as URL to be opened, read in, and written out to System.out.- Parameters:
args- URLs to open, read, and write to System.out- Throws:
IOException- if there are problems opening or reading from the URLs, or writing to System.out.
-
parseURL
Overrides parsing the URL to validate constraints on well formed archive syntax.- Overrides:
parseURLin classURLStreamHandler- See Also:
-
openConnection
Returns a newArchiveURLConnection.- Specified by:
openConnectionin classURLStreamHandler- Throws:
IOException
-