This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes using a RandomAccessFile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "using a RandomAccessFile" Watch "using a RandomAccessFile" New topic
Author

using a RandomAccessFile

Komal Amaresh
Ranch Hand

Joined: Oct 06, 2008
Posts: 67
Dear Sir,

Does a RandomAccessFile() class create a new file if the file mentioned does not exist

Does the above code create the 'File1.txt' in the ka3 folder if i call the above code in a method throwing IOException, if the file does not exist.

Thanks in advance,

with regards,
Komal
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
The javadocs of the RandomAccessFile constructors answer this question.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using a RandomAccessFile
 
Similar Threads
Problem when executing runnable jar file.
java.io.package
File I/O
renameTo method in io package...
File Exists