File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exception when writting to a readable file

 
ujwwala tem
Ranch Hand
Posts: 87
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

In interview there was a question regarding exception name when writting to a readable file,
I answered as if we use setReadonly true and latter check if file.canwritable if it returns true then we can write,

Please guide.

Thanks,
Ujwwala
 
Greg Charles
Sheriff
Posts: 2984
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think they were going for IOException. By "readable", they might have meant to say "read only". You'll get an IOException if you try to write to a read only file.
 
ujwwala tem
Ranch Hand
Posts: 87
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks fot the reply,

Regards,
Ujwwala
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic