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 java.lang.Object
implements AlternativeResourceLoader

Loads resources from the given class classloader.

Since:
3.0.0

Constructor Summary
AlternativeClassLoaderResourceLoader()
           
AlternativeClassLoaderResourceLoader(java.lang.Class<?> clazz)
           
 
Method Summary
 java.net.URL getResource(java.lang.String path)
          Retrieve the URL of the resource from the directories.
 java.io.InputStream getResourceAsStream(java.lang.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(java.lang.Class<?> clazz)
Method Detail

getResource

public java.net.URL getResource(java.lang.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 java.io.InputStream getResourceAsStream(java.lang.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 © 2013 Atlassian. All Rights Reserved.