java.io.CharArrayReader (JDK 1.1)
This class is a character input stream that uses a character array as the source of the characters it returns. You create a CharArrayReader by specifying the character array, or portion of an array, that it is to read from.
CharArrayReader defines the usual Reader methods, and supports the mark() and reset() methods.
Note that the character array you pass to the CharArrayReader is not copied by this class. This means that changes you make to the elements of the array after you create the input stream do affect the values read from the array.
CharArrayReader() is the character-array analog of ByteArrayInputStream, and is similar to StringReader.
public classCharArrayReaderextends Reader { //Public ConstructorspublicCharArrayReader(char[]buf); publicCharArrayReader(char[]buf, intoffset, intlength); //Protected Instance Variablesprotected char[]buf; protected intcount; protected intmarkedPos; protected intpos; //Public Instance Methodspublic voidclose(); //Defines Readerpublic voidmark(intreadAheadLimit) throws IOException; //Overrides Readerpublic booleanmarkSupported(); //Overrides Readerpublic intread() throws IOException; //Overrides Readerpublic intread(char[]b, intoff, intlen) throws IOException; //Defines Readerpublic booleanready() throws IOException; //Overrides Readerpublic voidreset() throws IOException; //Overrides Readerpublic longskip(longn) throws IOException; //Overrides Reader}
Hierarchy:
Object->Reader->CharArrayReader