Class OSGiFileLocator

java.lang.Object
org.jruby.embed.osgi.utils.OSGiFileLocator

public class OSGiFileLocator extends Object
Helper methods for the Ruby Runtime.
Author:
hmalphettes
  • Field Details

  • Constructor Details

    • OSGiFileLocator

      public OSGiFileLocator()
  • Method Details

    • getFileInBundle

      public static File getFileInBundle(String symbolicName, String path) throws IOException
      Throws:
      IOException
    • getFileInBundle

      public static File getFileInBundle(org.osgi.framework.Bundle bundle, String path) throws IOException
      Throws:
      IOException
    • getBundle

      public static org.osgi.framework.Bundle getBundle(String symbolicName)
      Parameters:
      symbolicName -
      Returns:
      The bundle with this symbolic name
    • getLocalURL

      public static URL getLocalURL(URL url)
      Only useful for equinox: on felix we get the file:// or jar:// url already. Other OSGi implementations have not been tested

      Get 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

      public static URL getFileURL(URL url)
      Only useful for equinox: on felix we get the file:// url already. Other OSGi implementations have not been tested

      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.

      Returns:
      a URL to the content of the bundle entry that uses the file: protocol