posted 23 years ago
Chandar S Vellithirumutha,
While reading a stream from a socket, if there is no data comming in and if you are performing a readObject on the socket:
then it will be in the blocked state until it timed out.
if u want to wait infinitely then u can use setSoTimeout(int) method in Socket class.
if the sent object is not a serialized one or if the server
is sending some response rather than an Object then this
listening socket will receive that and throws
java.io.StreamCorruptedException
regards,