I'm reading a file into a StringBuffer, something like this-
Now, the file I'm reading from is updated by the System every minute or so, So I was wondering if the FileReader action locks the file until the reading is over, because otherwise the file might be updated while I'm reading from it an thus , my numbers won't be correct.
Thanks for your help,
[...] Some platforms, in particular, allow a file to be opened for writing by only one FileOutputStream (or other file-writing object) at a time. In such situations the constructors in this class will fail if the file involved is already open. [...]
I tested on Windows (not concurrently) and I could open to OutputStreams and an InputStream simultaneously. I wrote to both OutputStreams, and after that I did some reading and everyting went alright.
I wanted to tested on Linux, but I really need to go to have breakfast. So you have fun with it.