title: How to check whether file is open or not in java
body: <p>I have one server which transfer the files to my directory periodically. I want to transfer these files to another directory. But i have to check whether any file is open or not at server, because i want to prevent the transfer of open files.</p>
  
  <p>If there anyway in java to check whether file is open or not.</p>
  
  <p>You can also suggest any jni lib in worst case.</p>