FileInputStream and FileOutputStream to the same file: Is a read() guaranteed to see all write()s that "happened before"?
- by user946850
I am using a file as a cache for big data. One thread writes to it sequentially, another thread reads it sequentially.
Can I be sure that all data that has been written (by write()) in one thread can be read() from another thread, assuming a proper "happens-before" relationship in terms of the Java memory model? Is this behavior documented?
EDIT:…