Class ClassPathResourceLoader

java.lang.Object
com.atlassian.jira.io.ClassPathResourceLoader
All Implemented Interfaces:
ResourceLoader

@ParametersAreNonnullByDefault public class ClassPathResourceLoader extends Object implements ResourceLoader
Resources Loader that is based on class loader.
Since:
v6.5
  • Constructor Details

    • ClassPathResourceLoader

      public ClassPathResourceLoader()
  • Method Details

    • getResourceAsStream

      public io.atlassian.fugue.Option<InputStream> getResourceAsStream(String resourcePath)
      Description copied from interface: ResourceLoader
      Opens stream to given resource from JIRA Core. See Class.getResourceAsStream(String) for exact semantics.
      Specified by:
      getResourceAsStream in interface ResourceLoader
      Parameters:
      resourcePath - path to resource
      Returns:
      some of inputStream if resource exists none otherwise.
    • getResource

      public io.atlassian.fugue.Option<URL> getResource(String resourcePath)
      Description copied from interface: ResourceLoader
      Opens URL to given resource from JIRA Core. See Class.getResource(String) for exact semantics.
      Specified by:
      getResource in interface ResourceLoader
      Parameters:
      resourcePath - path to resource
      Returns:
      some of URL if resource exists none otherwise.
    • getResourceAsStream

      public io.atlassian.fugue.Option<InputStream> getResourceAsStream(com.atlassian.plugin.Plugin plugin, String resourcePath)
      Description copied from interface: ResourceLoader
      Opens stream to given resource from plugin. See Class.getResourceAsStream(String) for exact semantics.
      Specified by:
      getResourceAsStream in interface ResourceLoader
      Parameters:
      resourcePath - path to resource
      Returns:
      some of inputStream if resource exists none otherwise.
    • getResource

      public io.atlassian.fugue.Option<URL> getResource(com.atlassian.plugin.Plugin plugin, String resourcePath)
      Description copied from interface: ResourceLoader
      Opens URL to given resource from plugin. See Class.getResource(String) for exact semantics.
      Specified by:
      getResource in interface ResourceLoader
      Parameters:
      resourcePath - path to resource
      Returns:
      some of URL if resource exists none otherwise.