title: Check if file is already open
body: <p>I need to write a custom batch File renamer. I've got the bulk of it done except I can't figure out how to check if a file is already open. I'm just using the <code>java.io.File</code> package and there is a <code>canWrite()</code> method but that doesn't seem to test if the file is in use by another program. Any ideas on how I can make this work?</p>