i already tried with this
if (!readAttributes.creationTime().equals(readAttributes.lastModifiedTime()))
but in some cases this gave me false while it was ended i am searching for a less cost effective way.
i know there are ways that are costly.
without buffer
files.copy
public static boolean isFileInUse(Path path) {
        try {
            LOGGER.info(path.toString());
            BasicFileAttributes readAttributes = Files.readAttributes(path, BasicFileAttributes.class);
            LOGGER.info("File TIME-->>   " + readAttributes.creationTime() + " :: " + readAttributes.lastModifiedTime());
            if (!readAttributes.creationTime().equals(readAttributes.lastModifiedTime()))
                return false;
        } catch (IOException e) {
            e.printStackTrace();
        }
        return true;
    }