This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton 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
Pie
Posts: 20527
54
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