/*
 *  @author Ranides Atterwim <ranides@gmail.com>
 *  @copyright Ranides Atterwim
 *  @license WTFPL
 *  @url http://ranides.net/projects/assira
 */

package net.ranides.assira.text;

import java.io.ByteArrayInputStream;
import java.nio.charset.Charset;

/**
 *
 * @author ranides
 */
public class TextInputStream extends ByteArrayInputStream {

    public TextInputStream(String text, Charset charset) {
        super(text.getBytes(charset));
    }

    public TextInputStream(String text, String charset) {
        this(text, Charset.forName(charset));
    }

    public TextInputStream(String text) {
        this(text, TextEncoding.NIO_UTF8);
    }

}