
com.hubspot.jinjava.tree.output.RenderedOutputNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jinjava Show documentation
Show all versions of jinjava Show documentation
Jinja templating engine implemented in Java
package com.hubspot.jinjava.tree.output;
import com.google.common.base.Charsets;
import java.nio.charset.Charset;
public class RenderedOutputNode implements OutputNode {
private final String output;
public RenderedOutputNode(String output) {
this.output = output;
}
@Override
public String getValue() {
return output;
}
@Override
public String toString() {
return getValue();
}
@Override
public long getSize() {
return output == null
? 0
: output.getBytes(Charset.forName(Charsets.UTF_8.name())).length;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy