public class URLTemplateSource extends AbstractTemplateSource
URL TemplateSource.| Constructor and Description |
|---|
URLTemplateSource(String filename,
URL resource)
Creates a new
URLTemplateSource. |
| Modifier and Type | Method and Description |
|---|---|
String |
content(Charset charset)
The template content.
|
String |
filename()
The file's name.
|
long |
lastModified()
The last modified date.
|
protected Reader |
reader(Charset charset)
Open the stream under the URL.
|
equals, hashCode, toStringpublic URLTemplateSource(String filename, URL resource)
URLTemplateSource.filename - The file's name.resource - The resource. Required.public String content(Charset charset) throws IOException
TemplateSourcecharset - Charset to use.IOException - If the template can't read.public String filename()
TemplateSourcepublic long lastModified()
TemplateSourceprotected Reader reader(Charset charset) throws IOException
charset - Charset.IOException - If the stream can't be opened.Copyright © 2020. All rights reserved.