Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about RandomAccessFile

 
Ramya Ramalingam
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to finish my choices.txt.Now I have lots questions in mind.
RAF opens the specified file,if not one it creates one(as my understanding..).I am not sure we have to create one.Is it one when the IOException is thrown,when trying to read the empty file.Since there is no specific reason for IOexception....can anybody help me how you handled this?


Thanks,
Ramya.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When the file does not exist, I throw an exception. This exception propagates back to the client and it is shown to the user (and then the application exits). A very simple and easy approach. No valid database file, no application (standalone client or network server).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic