public class URLResourceLoader extends ResourceLoader
| Modifier and Type | Field and Description |
|---|---|
protected HashMap |
templateRoots |
className, isCachingOn, log, modificationCheckInterval, rsvc| Constructor and Description |
|---|
URLResourceLoader() |
| Modifier and Type | Method and Description |
|---|---|
long |
getLastModified(Resource resource)
Checks to see when a resource was last modified
|
Reader |
getResourceReader(String name,
String encoding)
Get a Reader so that the Runtime can build a
template with it.
|
int |
getTimeout()
Returns the current, custom timeout setting.
|
void |
init(ExtProperties configuration)
Initialize the template loader with a
a resources class.
|
boolean |
isSourceModified(Resource resource)
Checks to see if a resource has been deleted, moved or modified.
|
buildReader, commonInit, getClassName, getModificationCheckInterval, isCachingOn, resourceExists, setCachingOn, setModificationCheckIntervalprotected HashMap templateRoots
public void init(ExtProperties configuration)
ResourceLoaderinit in class ResourceLoaderconfiguration - ResourceLoader.init(org.apache.velocity.util.ExtProperties)public Reader getResourceReader(String name, String encoding) throws ResourceNotFoundException
getResourceReader in class ResourceLoadername - name of template to fetch bytestream ofencoding - asked encodingResourceNotFoundException - if template not found
in the file template path.public boolean isSourceModified(Resource resource)
isSourceModified in class ResourceLoaderresource - Resource The resource to check for modificationpublic long getLastModified(Resource resource)
getLastModified in class ResourceLoaderresource - Resource the resource to checkpublic int getTimeout()
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.