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
Since:
0.11.0
  • Constructor Details

    • URLTemplateSource

      public URLTemplateSource(String filename, URL resource)
      Creates a new URLTemplateSource.
      Parameters:
      filename - The file's name.
      resource - The resource. Required.
  • Method Details

    • content

      public String content(Charset charset) throws IOException
      Description copied from interface: TemplateSource
      The template content.
      Parameters:
      charset - Charset to use.
      Returns:
      The template content.
      Throws:
      IOException - If the template can't read.
    • filename

      public String filename()
      Description copied from interface: TemplateSource
      The file's name.
      Returns:
      The file's name.
    • lastModified

      public long lastModified()
      Description copied from interface: TemplateSource
      The last modified date.
      Returns:
      The last modified date.