com.samskivert.super.java.io.StringReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jmustache Show documentation
Show all versions of jmustache Show documentation
A Java implementation of the Mustache templating language.
//
// $Id$
package java.io;
/**
* A basic implementation of {@code StringReader} for use in GWT.
*/
public class StringReader extends Reader
{
public StringReader (String data) {
_data = data;
}
public int read () throws IOException {
return (_pos >= _data.length()) ? -1 : _data.charAt(_pos++);
}
public void close () throws IOException {}
protected final String _data;
protected int _pos;
}