I have a problem with reading and writing to a file in a 'shared mode'. What my application needs is to be able to access file -or open- in a shared mode so that if one thread is writing to a file another should be able read from it. I have seen java.nio.channels.FileLock, however it has a problem, which I am quoting
So what else could be the solution to access in 'shared mode' to a file? To let multiple read accesses and to let read while writing or vice versa. It would be great if I could specify the mode while I open the file for example..
hope everything is clear..
P.S. I' m using jdk 1.6 so java.nio.Files is not supported.