Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to Lock the File using RandomAccessFile

 
shashi kale
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the RandomAccessFile since there are 2 procress .
one process will write in a.txt file and 2nd process will read from a.txt simultanously. i found that data get lost so i would like to set the lock on file that is while reading and writing the file.But locking faclilty is in reader and writer class so whether there is any way to lock the file in random access file.
Thanks in advance
 
marilyn murphy
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about synchronizing it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!