org.apache.velocity.runtime.resource.loader
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
|
InputStream |
getResourceStream(String name)
Get an InputStream so that the Runtime can build a
template with it.
|
int |
getTimeout()
Returns the current, custom timeout setting.
|
void |
init(org.apache.commons.collections.ExtendedProperties 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.
|
commonInit, getClassName, getModificationCheckInterval, isCachingOn, resourceExists, setCachingOn, setModificationCheckInterval
protected HashMap templateRoots
public void init(org.apache.commons.collections.ExtendedProperties configuration)
ResourceLoader
init
in class ResourceLoader
ResourceLoader.init(org.apache.commons.collections.ExtendedProperties)
public InputStream getResourceStream(String name) throws ResourceNotFoundException
getResourceStream
in class ResourceLoader
name
- name of template to fetch bytestream ofResourceNotFoundException
- if template not found
in the file template path.public boolean isSourceModified(Resource resource)
isSourceModified
in class ResourceLoader
resource
- Resource The resource to check for modificationpublic long getLastModified(Resource resource)
getLastModified
in class ResourceLoader
resource
- Resource the resource to checkpublic int getTimeout()
Copyright © 2000-2013 The Apache Software Foundation. All Rights Reserved.