public static boolean unlock(File file) {
        synchronized(lockedFiles) {
            final RandomAccessFile raf = lockedFiles.get(file);
            if (raf == null)
                return false;
            else {
                // Must close out the channel before removing it from the map;
                // or else risk giving a false negative (of no lock but in fact
                // the file is still locked by the file system.)
                IOUtils.closeQuietly(raf, log);
                lockedFiles.remove(file);
            }
        }
        if (log.isDebugEnabled())
            log.debug("Unlocked file " + file);
        return true;
    }
Unlocks a file previously locked via {@link #lock(File)}.

@return true if the unlock is successful; false otherwise. Successful
        unlock means we have found and attempted to close the locking
        file channel, but ignoring the fact that the close operation may
        have actually failed.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/FileLocks.java