com.atlassian.plugin.util.resource
Class AlternativePluginResourceLoader

java.lang.Object
  extended by com.atlassian.plugin.util.resource.AlternativePluginResourceLoader
All Implemented Interfaces:
AlternativeResourceLoader

public final class AlternativePluginResourceLoader
extends Object
implements AlternativeResourceLoader

Loads resources from the plugin.

Since:
3.0.0

Constructor Summary
AlternativePluginResourceLoader(Plugin plugin)
           
 
Method Summary
 URL getResource(String path)
          Retrieve the URL of the resource from the directories.
 InputStream getResourceAsStream(String name)
          Load a given resource from the directories.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlternativePluginResourceLoader

public AlternativePluginResourceLoader(Plugin plugin)
Method Detail

getResource

public URL getResource(String path)
Description copied from interface: AlternativeResourceLoader
Retrieve the URL of the resource from the directories.

Specified by:
getResource in interface AlternativeResourceLoader
Parameters:
path - the name of the resource to be loaded
Returns:
The URL to the resource, or null if the resource is not found

getResourceAsStream

public InputStream getResourceAsStream(String name)
Description copied from interface: AlternativeResourceLoader
Load a given resource from the directories.

Specified by:
getResourceAsStream in interface AlternativeResourceLoader
Parameters:
name - The name of the resource to be loaded.
Returns:
An InputStream for the resource, or null if the resource is not found.


Copyright © 2014 Atlassian. All rights reserved.