This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

RandomAccessFile  RSS feed

 
rex tony
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In RandomAccessFile which has rws,rwd mode.What are the difference between both of the mode.
 
Kelvin Chenhao Lim
Ranch Hand
Posts: 513
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rex,

The javadoc explains this pretty well:

"rws" - Open for reading and writing, as with "rw", and also require that every update to the file's content or metadata be written synchronously to the underlying storage device.

"rwd" -Open for reading and writing, as with "rw", and also require that every update to the file's content be written synchronously to the underlying storage device.


Note that "metadata" here refers to file system properties associated with the file, e.g. last access time, last modification time.
[ November 27, 2007: Message edited by: Kelvin Lim ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!