I have a Java process that opens a file using a FileReader. How can I prevent another (Java) process from opening this file, or at least notify that second process that the
use java.nio.channels.FileLock in conjunction with java.nio.channels.FileChannel