wood burning stoves 2.0*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "ObjectOutputStream,readObject  I/O error" Watch "ObjectOutputStream,readObject  I/O error" New topic
Author

ObjectOutputStream,readObject I/O error

Kevin Baker
Greenhorn

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 "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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ObjectOutputStream,readObject I/O error
 
Similar Threads
Reseting socket after few seconds
data lenght mismatch in socket code
Non Blocking HttpPost Request / Client-Server communication
HttpsUrlConnection - Facing problem while reading the input stream and establishing the cookie
Establishing two-way buffered streams