• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

RandomAccessFile : What is rws and rwd mode?

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi There,

Well i was going through the java docs for RandomAccessFile here.

In the description of constructor i could not differentiate the meaning of "rws" and "rwd" mode.

Basically what is the meaning of saying "written synchronously to the underlying storage device"?



Smile,
Tanzy.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As explained in the text the changes updated to the physical file before the I/O call returns if the file resides on the local device.
The difference between the two modes is that "rws" will write both changes to file contents and file metadata while "rwd" will update only on changes to file contents.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello "r035198x",

Welcome to JavaRanch. We have a naming policy here - we want users to use a real-sounding username, and not an obviously fake nickname.

Your username does not conform to the naming policy. Please read the policy carefully and change your display name, by editing your profile.

regards
Jesper Young
Bartender
 
What? What, what, what? What what tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic