de.quinscape.spring.jsview.template.TextContent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-jsview Show documentation
Show all versions of spring-jsview Show documentation
Spring-jsview is a flexible Spring WebMVC frontend view implementation with data injection.
package de.quinscape.spring.jsview.template;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Map;
final class TextContent
implements TemplatePart
{
private final byte[] content;
public TextContent(String content)
{
if (content == null)
{
throw new IllegalArgumentException("content can't be null");
}
this.content = content.getBytes(BaseTemplate.UTF_8);
}
@Override
public void write(OutputStream os, Map model) throws IOException
{
os.write(content);
}
}