Package org.jruby.embed.osgi.utils
Class OSGiFileLocator
java.lang.Object
org.jruby.embed.osgi.utils.OSGiFileLocator
Helper methods for the Ruby Runtime.
- Author:
- hmalphettes
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.osgi.framework.Bundle
static File
getFileInBundle
(String symbolicName, String path) static File
getFileInBundle
(org.osgi.framework.Bundle bundle, String path) static URL
getFileURL
(URL url) Only useful for equinox: on felix we get the file:// url already.static URL
getLocalURL
(URL url) Only useful for equinox: on felix we get the file:// or jar:// url already.
-
Field Details
-
JRUBY_SYMBOLIC_NAME
- See Also:
-
-
Constructor Details
-
OSGiFileLocator
public OSGiFileLocator()
-
-
Method Details
-
getFileInBundle
- Throws:
IOException
-
getFileInBundle
public static File getFileInBundle(org.osgi.framework.Bundle bundle, String path) throws IOException - Throws:
IOException
-
getBundle
- Parameters:
symbolicName
-- Returns:
- The bundle with this symbolic name
-
getLocalURL
Only useful for equinox: on felix we get the file:// or jar:// url already. Other OSGi implementations have not been testedGet a URL to the bundle entry that uses a common protocol (i.e. file: jar: or http: etc.).
- Returns:
- a URL to the bundle entry that uses a common protocol
-
getFileURL
Only useful for equinox: on felix we get the file:// url already. Other OSGi implementations have not been testedGet a URL to the content of the bundle entry that uses the file: protocol. The content of the bundle entry may be downloaded or extracted to the local file system in order to create a file: URL.
- Returns:
- a URL to the content of the bundle entry that uses the file: protocol
-