• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

I/O BufferedInputStream  RSS feed

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have trouble using BufferedInputStream. I'm trying to read the int I just have written to the file. Is the code OK?
I get the error text:
IOException in DataFiles: java.io.EOFException
java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:343)
at FileBuff.main(FileBuff.java:27)
Something wrong with the file (just a text file) or with the readInt()?
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reverse the order of your 3 close calls. They are backwards...
i.e. change

to

It worked for me.
Mel
[ January 31, 2002: Message edited by: Melynda Coxx ]
 
Nils Persson
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes of course, thanks!
 
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
global solutions you can do at home or in your backyard
https://www.kickstarter.com/projects/paulwheaton/better-world-boo
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!