public class SimpleStringResourceLoader
extends org.apache.velocity.runtime.resource.loader.ResourceLoader
ResourceLoader
的字符串实现形式Constructor and Description |
---|
SimpleStringResourceLoader() |
Modifier and Type | Method and Description |
---|---|
long |
getLastModified(org.apache.velocity.runtime.resource.Resource resource) |
Reader |
getResourceReader(String source,
String encoding) |
InputStream |
getResourceStream(String source)
获取资源流
|
void |
init(org.apache.velocity.util.ExtProperties configuration) |
boolean |
isSourceModified(org.apache.velocity.runtime.resource.Resource resource) |
public void init(org.apache.velocity.util.ExtProperties configuration)
init
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
public InputStream getResourceStream(String source) throws org.apache.velocity.exception.ResourceNotFoundException
source
- 字符串模板org.apache.velocity.exception.ResourceNotFoundException
- 资源未找到public Reader getResourceReader(String source, String encoding) throws org.apache.velocity.exception.ResourceNotFoundException
getResourceReader
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
org.apache.velocity.exception.ResourceNotFoundException
public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
isSourceModified
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
getLastModified
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
Copyright © 2024. All rights reserved.