This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes EOFException on readObject() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "EOFException on readObject()" Watch "EOFException on readObject()" New topic
Author

EOFException on readObject()

Stelios Kotsifos
Greenhorn

Joined: Oct 10, 2013
Posts: 1
I have created a server-client application where the client asks for data from the server using a custom Message class. I've made the Message class into a JAR and use it as an external reference in both the server and the client, so both apps would use the same class for serialization/de-serialization. When I send a Message object from the client to the server, I get the EOFException on the line where the server reads from the ObjectInputStream.
This is the server code:


The client is for Android but I don't think that this has anything to do with the problem.
This is the client class:


On the main activity I just have 2 buttons, one to connect to the server and one to send the Message object
This is the Main Activity Code:


Anyone have any idea what's wrong with my code?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EOFException on readObject()
 
Similar Threads
java.net.SocketException: Connection reset
Phone to phone/emulator comminication
File transfer from Client to Server side
Communicate 2 android in 2 emulator
hi some one help