com.atlassian.plugin.util.resource
Class AlternativeClassLoaderResourceLoader

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

public final class AlternativeClassLoaderResourceLoader
extends Object
implements AlternativeResourceLoader

Loads resources from the given class classloader.

Since:
3.0.0

Constructor Summary
AlternativeClassLoaderResourceLoader()
           
AlternativeClassLoaderResourceLoader(Class<?> clazz)
           
 
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

AlternativeClassLoaderResourceLoader

public AlternativeClassLoaderResourceLoader()

AlternativeClassLoaderResourceLoader

public AlternativeClassLoaderResourceLoader(Class<?> clazz)
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.