This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ObjectOutputStream,readObject I/O error

 
Kevin Baker
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I've seen postings for this problem everywhere but no real solution so I decided to give it a shot.
I'm using readObject to deserialize an object sent through a socket. The first read blocks and works fine but once the first object is read from the stream the readObject starts throwing "java.io.EOFException: Expecting code" which is not really a problem because I can just catch it, but it is the fact that readObject stops blocking and begins to spin. Also once the EOFException is thrown connection to the server is lost.
I've tried everything I could think of short of standing on my head, if anyone one has any suggestions I'd be very appreciative.
Client Code:

*code tags added for easier reading-- Jason*
[ March 23, 2004: Message edited by: jason adam ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic