All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.quinscape.spring.jsview.template.TextContent Maven / Gradle / Ivy

Go to download

Spring-jsview is a flexible Spring WebMVC frontend view implementation with data injection.

There is a newer version: 1.0
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy