Reputation: 3278
This branches into two questions:
I know it's possible to create a FileReader and a FileWriter for the same file at once. Do the FileReader and FileWriter play well with each other, i.e., is the newly written content guaranteed to be visible to the reader while both are still open? Is there any guaranteed behavior for the way that they will interact with each other?
Is it possible to create one entity that can read, write, and seek within a file? For example, something equivalent to python's open(filename, "r+")
. If such an entity exists, is there one in java.io or only third party?
Upvotes: 1
Views: 51