Package org.apache.felix.framework
Class FakeURLStreamHandler
java.lang.Object
java.net.URLStreamHandler
org.apache.felix.framework.FakeURLStreamHandler
This class implements a fake stream handler. This class is necessary in
some cases when assigning CodeSources to classes in
BundleClassLoader. In general, the bundle location is an URL
and this URL is used as the code source for the bundle's associated
classes. The OSGi specification does not require that the bundle
location be an URL, though, so in that case we try to generate a
fake URL for the code source of the bundle, which is just the location
string prepended with the "location:" protocol, by default. We need
this fake handler to avoid an unknown protocol exception.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.net.URLStreamHandler
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, parseURL, sameFile, setURL, setURL, toExternalForm
-
Constructor Details
-
FakeURLStreamHandler
FakeURLStreamHandler()
-
-
Method Details
-
openConnection
- Specified by:
openConnection
in classURLStreamHandler
- Throws:
IOException
-