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

com.samskivert.gwt.java.io.StringReader Maven / Gradle / Ivy

There is a newer version: 0.2.0
Show newest version
//
// $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++);
    }

    protected final String _data;
    protected int _pos;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy