jQuery in Action, 2nd edition
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Random Access File modes Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply 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: 18670
The valid modes are indeed "r" and "rw". "+rw" is not a valid mode.


"I'm not back." - Bill Harding, Twister
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Random Access File modes
 
Similar Threads
ambigious question about random access file
RandomAccessFile-----Barry Boone Mock
B&S: Server Shutdown
how to getcursor to first location of file?
calculations using JSP