|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.thymeleaf.resourceresolver.UrlResourceResolver
public final class UrlResourceResolver
Implementation of IResourceResolver
that resolves
resources as URLs:
try {
final URL url = new URL(resourceName);
return url.openStream();
} catch (final Exception e1) {
return null;
}
Field Summary | |
---|---|
static String |
NAME
|
Constructor Summary | |
---|---|
UrlResourceResolver()
|
Method Summary | |
---|---|
String |
getName()
The name of the resource resolver. |
InputStream |
getResourceAsStream(Arguments arguments,
String resourceName)
Resolve the resource, this is, open an input stream for it. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NAME
Constructor Detail |
---|
public UrlResourceResolver()
Method Detail |
---|
public String getName()
IResourceResolver
The name of the resource resolver.
getName
in interface IResourceResolver
public InputStream getResourceAsStream(Arguments arguments, String resourceName)
IResourceResolver
Resolve the resource, this is, open an input stream for it.
If the resource cannot be resolved, this method should return null.
getResourceAsStream
in interface IResourceResolver
arguments
- the Arguments
object being used for template processingresourceName
- the resource name to be resolved/read
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |