public class OSGiFileLocator extends Object
Modifier and Type | Field and Description |
---|---|
static String |
JRUBY_SYMBOLIC_NAME |
Constructor and Description |
---|
OSGiFileLocator() |
Modifier and Type | Method and Description |
---|---|
static org.osgi.framework.Bundle |
getBundle(String symbolicName) |
static File |
getFileInBundle(org.osgi.framework.Bundle bundle,
String path) |
static File |
getFileInBundle(String symbolicName,
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.
|
public static final String JRUBY_SYMBOLIC_NAME
public static File getFileInBundle(String symbolicName, String path) throws IOException
IOException
public static File getFileInBundle(org.osgi.framework.Bundle bundle, String path) throws IOException
IOException
public static org.osgi.framework.Bundle getBundle(String symbolicName)
symbolicName
- public static URL getLocalURL(URL url)
Get a URL to the bundle entry that uses a common protocol (i.e. file: jar: or http: etc.).
public static URL getFileURL(URL url)
Get 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.
Copyright © 2001-2015 JRuby. All Rights Reserved.