Package com.github.jknack.handlebars.io
Class URLTemplateSource
- java.lang.Object
-
- com.github.jknack.handlebars.io.AbstractTemplateSource
-
- com.github.jknack.handlebars.io.URLTemplateSource
-
- All Implemented Interfaces:
TemplateSource
public class URLTemplateSource extends AbstractTemplateSource
AnURLTemplateSource.- Since:
- 0.11.0
-
-
Constructor Summary
Constructors Constructor Description URLTemplateSource(String filename, URL resource)Creates a newURLTemplateSource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcontent()The template content.Stringfilename()The file's name.longlastModified()The last modified date.-
Methods inherited from class com.github.jknack.handlebars.io.AbstractTemplateSource
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
URLTemplateSource
public URLTemplateSource(String filename, URL resource)
Creates a newURLTemplateSource.- Parameters:
filename- The file's name.resource- The resource. Required.
-
-
Method Detail
-
content
public String content() throws IOException
Description copied from interface:TemplateSourceThe template content.- Returns:
- The template content.
- Throws:
IOException- If the template can't read.
-
filename
public String filename()
Description copied from interface:TemplateSourceThe file's name.- Returns:
- The file's name.
-
lastModified
public long lastModified()
Description copied from interface:TemplateSourceThe last modified date.- Returns:
- The last modified date.
-
-