public static boolean isFileLocked(File file) {
        synchronized(lockedFiles) {
            return lockedFiles.containsKey(file);
        }
    }
Returns true if the specified file is currently locked; false otherwise.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/FileLocks.java