This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Random Access File modes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Random Access File modes" Watch "Random Access File modes" New topic
Author

Random Access File modes

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
this compiles. But gives a run time error.
RandomAccessFile raf = new RandomAccessFile(f,"+rw");
where f is a File.
The valid modes as I know them (which may be wrong) are "r" and "rw". please enlighten
Prasad
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
The valid modes are indeed "r" and "rw". "+rw" is not a valid mode.


"I'm not back." - Bill Harding, Twister
 
 
subject: Random Access File modes
 
Similar Threads
RandomAccessFile-----Barry Boone Mock
B&S: Server Shutdown
how to getcursor to first location of file?
ambigious question about random access file
calculations using JSP