title: Check if a file is open before reading it?
body: <p>I'm trying to make an applet that reads a file on the local file system (the users computer) at a very frequent interval (several times a second), then makes the contents of the file available to the web page via javascript. </p>
  
  <p>The file the applet needs to read is updated at a high frequency by a program on the user's computer. What I'm concerned about is what might happen if the applet reads data from the file when the file is in the middle of being updated.</p>
  
  <p>I don't know how likely this is, but if it is a valid concern is there a way to make sure the file is not currently being written to before reading it?</p>