R
Rob McCready
I've been stuck all day on what certainly appears to be an easy
question. I have a Java process that needs to read from a file while
another process simultaneously writes to it. I don't care if I read
dirty data. I just don't want to prevent the writing process to be
locked by the OS from writing.
I'm using a java.io.FileReader and then passing it into a
java.io.BufferedReader. Then I'm calling .readLine() on the
BufferedReader. Now, before I close all the streams and go out of
scope, I can't open the file with, say Word, and then save it in Word.
This is because the OS is locking it out because another process is
reading from it.
I've scrapped over the JDK and can't find any leads on how to do
something which I thought would be pretty trivial.
OS - Windows XP
Java 1.4.1
Any help is greatly appreciated.
question. I have a Java process that needs to read from a file while
another process simultaneously writes to it. I don't care if I read
dirty data. I just don't want to prevent the writing process to be
locked by the OS from writing.
I'm using a java.io.FileReader and then passing it into a
java.io.BufferedReader. Then I'm calling .readLine() on the
BufferedReader. Now, before I close all the streams and go out of
scope, I can't open the file with, say Word, and then save it in Word.
This is because the OS is locking it out because another process is
reading from it.
I've scrapped over the JDK and can't find any leads on how to do
something which I thought would be pretty trivial.
OS - Windows XP
Java 1.4.1
Any help is greatly appreciated.