• Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt on FileInputStream  RSS feed

 
Ashok Pradhan
Ranch Hand
Posts: 180
Eclipse IDE Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my program :-



the output:
255
256
257
258
259
********************
255
0
1
2
3

My doubt is I have written to my file by FileOutputStream 255,256,257,258,259 but when I want to read by FileInputStream the output is different .But when I invoke my out.write(i); the both out put is same.Why the behavior is different when the write() argument is greater than 255.
 
Joe Ess
Bartender
Posts: 9426
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at the API documentation for OutputStream.write() and see if it makes sense of what you are seeing.
[ October 30, 2008: Message edited by: Joe Ess ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!