• 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
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

RandomAccessFile mode

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

What mode to use on RandomAccessFile? It seems quite some people are using "rwd" or "rws", but I have the feeling "rw" is enough.

I've read this thread:
https://coderanch.com/t/184847/java-developer-SCJD/certification/NX-RandomAccessFile-mode


But I'm still rather confused on it, as this thread doesn't seem to give a complete overview of all advantages and disadvantages.

Rinke
[ July 13, 2007: Message edited by: rinke hoekstra ]
 
Ranch Hand
Posts: 332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think, that this is not needed for exam.
 
rinke hoekstra
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by John Stone:
I think, that this is not needed for exam.





Why not? If you're using RandomAccessFile, you will need to create that object via its constructor, so you will need to decide whether you construct RandomAccessFile with "rw", "rwd" or "rws". So if you are using RandomAccessFile this is part of the exam.
 
John Stone
Ranch Hand
Posts: 332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It should not matter which one you use. There is no requirement, that we should think about data being corrupted by e.g. power outage.
Following this way, you may also find yourself implementing some kind of journal log to be able to recover from corrupted database and that is surely not needed.
 
rinke hoekstra
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK John,

thanks for clarifying.
 
I suggest huckleberry pie. But the only thing on the gluten free menu is this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic