Objectdeserialization over network
i am getting the following excepetion when i try to read an object from an ObjectInputStream via network like this:

    Socket socket = new Socket("localhost", 4444);
    ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());
    while ((Object o = ois.readObject()) != null) {
    }


excpetion:

    java.io.EOFException
    	at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
    	at java.io.ObjectInputStream.readObject0(Unknown Source)
    	at java.io.ObjectInputStream.readObject(Unknown Source)

the connection itself seems fine, since i am able to read strings via the network, but objects dont work.

since it is an EOFExcpetion i assume that the stream currently sends no more data. (which is ok).
so i was thinking maybe i am using objectdeserialization the wrong way?

what could be the problem here? thanks!
Objectdeserialization over network
===

i am getting the following excepetion when i try to read an object from an ObjectInputStream via network like this:

    Socket socket = new Socket("localhost", 4444);
    ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());
    while ((Object o = ois.readObject()) != null) {
    }


excpetion:

    java.io.EOFException
    	at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
    	at java.io.ObjectInputStream.readObject0(Unknown Source)
    	at java.io.ObjectInputStream.readObject(Unknown Source)

the connection itself seems fine, since i am able to read strings via the network, but objects dont work.

since it is an EOFExcpetion i assume that the stream currently sends no more data. (which is ok).
so i was thinking maybe i am using objectdeserialization the wrong way?

what could be the problem here? thanks!