Clearly you aren’t sending the data with ObjectOutputStream:
you are just writing the bytes.
- If you read with
readObject()
you must write withwriteObject().
- If you read with
readUTF()
you must write withwriteUTF().
- If you read with
readXXX()
you must write withwriteXXX(),
for most values of XXX