edu.rit.util
Class StringReader
java.lang.Object
edu.rit.util.StringReader
public class StringReader
- extends Object
Class StringReader encapsulates an object that reads a string one character
at a time. It doesn't throw IOExceptions like class java.io.StringReader.
Constructor Summary |
StringReader(String s)
Construct a new StringReader that will read from the given string. |
Method Summary |
int |
read()
Read the next character from this string reader. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringReader
public StringReader(String s)
- Construct a new StringReader that will read from the given string.
- Parameters:
s
- String to read.
read
public int read()
- Read the next character from this string reader.
- Returns:
- Character, or -1 if there are no more characters.
Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark@cs.rit.edu.