Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt regarding FileInputStream

 
archu sweet
Ranch Hand
Posts: 66
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator




when i ran this code i got No such file found, Doing finally, -1 as output...

All I need to know is FileInputStream creates a new file then how come no such file found is printed???
 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) KeepItDown. No need for all uppercase sentences like that.
2) It's FileOutputStream that creates a new file if it doesn't exist yet. FileInputStream throws an exception.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!