Class AbstractStringTemplateSet

java.lang.Object
io.inverno.mod.irt.AbstractTemplateSet
io.inverno.mod.irt.AbstractStringTemplateSet
All Implemented Interfaces:
TemplateSet

public abstract class AbstractStringTemplateSet extends AbstractTemplateSet

A TemplateSet base implementation template sets which renders data in a StringBuilder

Since:
1.2
Author:
Jeremy Kuhn
  • Constructor Details

    • AbstractStringTemplateSet

      public AbstractStringTemplateSet(Charset charset)

      Creates a String template set.

      Parameters:
      charset - the charset to use to encode data
  • Method Details

    • getOutput

      public String getOutput()

      Returns the string containing the rendered data.

      Returns:
      a string
    • render

      public CompletableFuture<Void> render(String value)
      Description copied from interface: TemplateSet

      Renders a string to the output.

      Parameters:
      value - the string to render
      Returns:
      a future which completes once the value is rendered
    • render

      public CompletableFuture<Void> render(byte[] value)
      Description copied from interface: TemplateSet

      Renders a byte array to the output.

      Parameters:
      value - The byte array to render
      Returns:
      a future which completes once the value is rendered