public class ResourceResolver extends Object
This default implementation uses the thread context ClassLoader.
Constructor and Description |
---|
ResourceResolver() |
Modifier and Type | Method and Description |
---|---|
static ResourceResolver |
getInstance()
Gets the current resolver (thread local).
|
URL |
getResource(String path)
Gets a resource URL at the given path.
|
InputStream |
getResourceAsStream(String path)
Gets a resource at the given path.
|
static void |
setInstance(ResourceResolver resolver)
Called by the framework to set the current resolver or clear it.
|
public static ResourceResolver getInstance()
public static void setInstance(ResourceResolver resolver)
public URL getResource(String path)
path
- the path, which must not start with a /ServletContext.getResource(java.lang.String)
,
ClassLoader.getResource(java.lang.String)
public InputStream getResourceAsStream(String path)
path
- the path, which must not start with a /ServletContext.getResourceAsStream(java.lang.String)
,
ClassLoader.getResourceAsStream(java.lang.String)
Copyright © 2013 Nuxeo SA. All Rights Reserved.