BufferedReader.readLine() pb !!! Help !!!
Hello,
I want to read lines from a file "while (true)" ... because an other application will append some lines in this file at the same tim I will read lines from it.
This code is bad because the readLine() is not blocking when no input is available and then it is consuming all CPU process:
BufferedReader in = new BufferedReader(new FileReader("readfromfile.txt"));
String readLine;
while (true)
{
readLine = in.readLine();
if (readLine!=null) // Doing something with readLine ...
}
Someone could help and tell to me if a similar method does exist with a blocking readLine() ?
Thanks
Ludo from france

