Comment by hmottestad
10 years ago
I don't program much in C, or use direct system calls for files. Mostly I use Java.
Does anyone know if any of this applies to Java's IO operations. I'm sure you can force some of this behaviour, but for instance: The flush method on OutputStream, will it ensure proper sync, or is that again dependent on the OS and file system as described in the article for syscalls?
This answers your question:
http://docs.oracle.com/javase/8/docs/api/java/io/OutputStrea...
It's only logical if you think about the bigger picture. Does Java have access to the underlying disk device or does it work with the filesystem? Which component is responsible for the filesystem?
You can force writes to disk with NIO, but I don't think that really solves any of the problems detailed in this article.