java.io.StreamCorruptedException: invalid type code: 00

This problem can happen if you

  • construct a new ObjectInputStream or ObjectOutputStream over the same socket instead of using the same ones for the life of the socket;
  • use another kind of stream over the same socket as well; or,
  • use the object streams to read or write something that isn’t an object and you get out of sync.

Leave a Comment