public synchronized void close ( ) throws SecurityException { super . close ( ) ; // Unlock any lock file. if ( lockFileName == null ) { return ; } try { // Closing the lock file's FileOutputStream will close // the underlying channel and free any locks. lockStream . close ( ) ; } catch ( Exception ex ) { // Problems closing the stream. Punt. } synchronized ( locks ) { locks . remove ( lockFileName ) ; } new File ( lockFileName ) . delete ( ) ; lockFileName = null ; lockStream = null ; }
Close all the files .