Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

BufferedReader.ready() true at end of stream ?

Fri Oct 24, 2008 9:41 pm

Is BufferedReader.ready() true, false or undefined, when the end of
the stream is reached (and the next read() would return -1)?



Re: BufferedReader.ready() true at end of stream ?

Fri Oct 24, 2008 9:42 pm

BufferedReader.ready() only return true or false. According to javadoc, it
will return true
if the buffer is not empty or the underlying character stream is ready. So, If
the end of stream is reached, the underlying charatecter stream must not be
ready and depends to the buffer.

Post a reply
  Related Posts  to : BufferedReader.ready() true at end of stream ?
 lets get ready for Game Programming--->L 7     -  
 FreshersFreshers.com, Fresher jobs Portal is getting ready t     -  
 stream get filters     -  
 stream operator     -  
 stream filter to append     -  
 Read stream from URL using Java     -  
 How to stream a live video from a dlink     -  

Topic Tags

Java Files and I/O