aspose file tools*
The moose likes Beginning Java and the fly likes Doubt regarding FileInputStream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Doubt regarding FileInputStream " Watch "Doubt regarding FileInputStream " New topic
Author

Doubt regarding FileInputStream

archu sweet
Ranch Hand

Joined: Mar 07, 2011
Posts: 66





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

Joined: Oct 27, 2005
Posts: 19693
    
  20

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt regarding FileInputStream