I am sending a serialized object from servlet to applet, I am getting it to the input stream, when I try to pass to the ObjectInputStream constructor, I am getting an Stream corrupted Exception.,and it says object not serialized properly, well I have serialized it on the servlet.
The error occurs in the line below

<javacode>
ObjectInputStream oi = new ObjectInputStream(in)
//where in the inputsream object from the server
</javacode>