File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes RandomAccessFile Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "RandomAccessFile" Watch "RandomAccessFile" New topic
Author

RandomAccessFile

rex tony
Ranch Hand

Joined: Aug 29, 2007
Posts: 159
In RandomAccessFile which has rws,rwd mode.What are the difference between both of the mode.
Kelvin Chenhao Lim
Ranch Hand

Joined: Oct 20, 2007
Posts: 513
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 ]

SCJP 5.0
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: RandomAccessFile
 
Similar Threads
IO streams
How to write to a particular location in a file?
Problem with ArrayList !!!!!
using a RandomAccessFile
Read only specified number of rows from a .csv file