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 Random Access File modes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Random Access File modes
 
Similar Threads
RandomAccessFile-----Barry Boone Mock
B&S: Server Shutdown
ambigious question about random access file
how to getcursor to first location of file?
calculations using JSP