com.atlassian.plugin.util.resource
Class AlternativeClassLoaderResourceLoader
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AlternativeClassLoaderResourceLoader
public AlternativeClassLoaderResourceLoader()
AlternativeClassLoaderResourceLoader
public AlternativeClassLoaderResourceLoader(Class<?> clazz)
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.