No. reset()
sends a tag over the wire that tells the peer to clear its handle table. As you're about to close the stream anyway, the reset operation has no meaning, and it's an extra network operation to go wrong. Just close it.
As for other problems:
Construct the
ObjectOutputStream
before theObjectInputStream.
Otherwise a deadlock can occur.Use the try-with-resources syntax here. It will simplify the code a lot.