private static boolean sync(@NonNull FileOutputStream stream) {
        try {
            stream.getFD().sync();
            return true;
        } catch (IOException e) {
        }
        return false;
    }
A convenience for {@link #openRead()} that also reads all of the
file contents into a byte array which is returned.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/AtomicFile.java