/** * Flushes and closes all opened files. * * @throws SecurityException * if a security manager exists and it determines that the * caller does not have the required permissions to control this * handler; required permissions include * {@code LogPermission("control")}, * {@code FilePermission("write")} etc. */ public override void close() { // release locks base.close(); allLocks.remove(fileName); try { java.nio.channels.FileChannel channel = lockJ.channel(); lockJ.release(); channel.close(); java.io.File file = new java.io.File(fileName + LCK_EXT); file.delete(); } catch (java.io.IOException e) { // ignore } }