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.ResourceLoaderpublic 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.ResourceLoaderorg.apache.velocity.exception.ResourceNotFoundExceptionpublic boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
isSourceModified in class org.apache.velocity.runtime.resource.loader.ResourceLoaderpublic long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
getLastModified in class org.apache.velocity.runtime.resource.loader.ResourceLoaderCopyright © 2025. All rights reserved.