File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes I/O and Streams and the fly likes ObjectOutputStream,readObject  I/O error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "ObjectOutputStream,readObject  I/O error" Watch "ObjectOutputStream,readObject  I/O error" New topic

ObjectOutputStream,readObject I/O error

Kevin Baker

Joined: Jun 20, 2002
Posts: 10
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 " 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 ]
I agree. Here's the link:
subject: ObjectOutputStream,readObject I/O error
It's not a secret anymore!