Hi,
I am using a text file to store the serial port output. And now I want to put the contents of the file to an textArea in java. I have created a dedicated thread for file read operation. I need the thread to sleep when there is no data to read and thread should wake up automatically once data available for read in the file. In the thread I am using a while loop and using readLine() method for reading from file. But when data not available when readLine called in while loop the loop exits and thread terminates. Can anybody suggest how to implement this?