java.lang.Object
java.net.URLStreamHandler
org.eclipse.osgi.framework.internal.protocol.reference.Handler
- public class Handler
- extends java.net.URLStreamHandler
URLStreamHandler for reference protocol. A reference URL is used to hold a
reference to a local file URL. A reference URL allows bundles to be installed
by reference. This means the content of the bundle will not be copied. Instead
the content of the bundle will be loaded from the reference location specified
by the reference URL. The Framework only supports reference URLs that refer
to a local file URL. For example:
reference:file:/eclipse/plugins/org.eclipse.myplugin_1.0.0/
reference:file:/eclispe/plugins/org.eclipse.mybundle_1.0.0.jar
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Handler
public Handler()
openConnection
protected java.net.URLConnection openConnection(java.net.URL url)
throws java.io.IOException
- Description copied from class:
java.net.URLStreamHandler
- Returns a URLConnection for the passed in URL. Note that this should
not actually create the connection to the (possibly) remote host, but
rather simply return a URLConnection object. The connect() method of
URL connection is used to establish the actual connection, possibly
after the caller sets up various connection options.
parseURL
protected void parseURL(java.net.URL url,
java.lang.String str,
int start,
int end)
- Description copied from class:
java.net.URLStreamHandler
- This method parses the string passed in as a URL and set's the
instance data fields in the URL object passed in to the various values
parsed out of the string. The start parameter is the position to start
scanning the string. This is usually the position after the ":" which
terminates the protocol name. The end parameter is the position to
stop scanning. This will be either the end of the String, or the
position of the "#" character, which separates the "file" portion of
the URL from the "anchor" portion.
This method assumes URL's are formatted like http protocol URL's, so
subclasses that implement protocols with URL's the follow a different
syntax should override this method. The lone exception is that if
the protocol name set in the URL is "file", this method will accept
an empty hostname (i.e., "file:///"), which is legal for that protocol