Wednesday 15 January 2014

File read by interrupt in java -


I am using a text file to store serial port output. And now I want to put the contents of the file in Textaria in Java. I have created a dedicated thread for reading the file. I need to sleep the thread when there is no data to read and the thread should automatically wake up when the data is available for reading in the file. In the thread I am using the loop for a while and am using the readLine () method to read from the file. But when the data is not available when the readLine is called in the loop when the loop leaves and the thread ends. Can someone suggest how to implement it?

You write FIFO pipe ( man mkfifo ) and instead of the serial Port writes output data, or writes both in FIFO and file ( man tee )

The cause loop goes out, as far as I understand, that you're killing the end of the file.


No comments:

Post a Comment