Package java.io
Class InputStreamReader
Description:
This method tell whether this stream is ready to be read. An InputStreamReader is ready if its input buffer is not empty, or if bytes are available to be read from the underlying byte stream.
Example
File file = new File("testFile");
InputStream in = new FileInputStream(file);
InputStreamReader inr = new InputStreamReader(in);
char[] charBuff = new char[5];
if (inr.ready())
inr.read(charBuff,0,5);
The example above reads five bytes into a character array if the stream is ready.