so locking just from the current position would allow reading on systems where
locking is mandatory. Also, Java 6 will throw an exception if the region of the
file is already locked by another FileChannel in the same JVM. Hopefully, that will
be avoided since every file should have a single file manager - unless two different
files strings are configured that somehow map to the same file.*/
FileLock lock = channel.lock(0, Long.MAX_VALUE, false);
try {
super.write(bytes, offset, length);
} finally {
lock.release();
}