I use the RandomAccessFile approach for io. I currently open the raf with mode "rwd". Here is the API info I find for the different modes:
"rw" Open for reading and writing. If the file does not already exist then an attempt will be made to create it.
"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.
I have not worked a lot with RandomAccessFile and am wondering if one is suggested over the others. I did notice in the API description for the "rws" and "rwd" it mentions they may be more efficient.
Thoughts?
TJ