Package java.io
Class StringReader
Description:
This method tell whether this stream is ready to be read.
Example
String buffer = "Hello World";
StringReader sr = new StringReader(buffer);
int dim = 6;
char[] b = new char[dim];
if (sr.ready())
Console.println("number of characters: " + sr.read(b, 0, dim));
else
Console.println("stream is not ready");
The example checks if the stream is ready.