Package java.io
Class StringBufferInputStream
Description:
This method resets the input stream to begin reading from the first character of this input stream's underlying buffer.
Example
String str = "Hello World";
StringBufferInputStream sbis = new StringBufferInputStream(str);
Console.println("read the first element of the string: " + sbis.read());
Console.println("read the second element of the string: " + sbis.read());
sbis.reset();
Console.println("read the first element of the stiring: " + sbis.read());
The example above reads the first two elements of the String, resets the stream to the beginning of the string, reads only the first element again, and prints it to the console.