This week's book giveaway is in the Testing forum. We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line! See this thread for details.
Now, I need to read a file (whose contents may keep changing over the course of the 100 seconds). Everytime I read the contents of the file, I need to get the new data (that's been added).
PS : No data will be deleted from the file. Data would only be added.
So, I assume I require to mark an offset and read from that offset until I encounter EOF. Every single time. How do I do this?
But, I do not know the len (length of characters) to be read each time. Remember, I need to read till EOF everytime. Someone suggested me to use the ready() method of BufferedReader, but I'm lost and do not know how to use it. Can someone put up a prototype example depicting this situation?
One other suggestion was not to use ready() but read until I encounter an Exception.. How do I use it if I want to go this way?