Package java.io
Class StringReader

Public Method ready

boolean ready()

Overrides:

Throws:

_INSERT_METHOD_SIGNATURE_HERE_

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.