When using tcp/ip, it is reasonable certain that the stream is not corrupted in transit "by accident", so don't bother about that.
If you are worried about security, note that Md5 is not secure, anyone can compute a md5 checksum, you need some sort of secret key or pki-solution for the signing.
Note that "signing" is just authentication, the actual message can still be read by someone else. You need encryption + authentication if you also want the content to be secret.
A simple solution is to send your data over a ssl-socket.
I would recommend turning to bouncycastle for good encryption support.
If the messages are transported in some other way (and might need to be handled by other systems, stored on files, ftp:ed, mq:ed, xml-ed etc etc,) you can serialise the message to a byte[], and sign them using a signer in org.bouncycastle.crypto.signers and calculate and append a signature as a byte[] after the actual message.
In that case, you would need to use a message format so that you can separate and extract both the data and the signature, and then recalulate the signature (using the public key of the sender) and make sure that the received and calculated signatures match.
There are several standards for this, S/MIME, pgp, PKCS#7RFC 3369 , and they are probably better than anything you or me can come up with, so investigate them.
If you are using RMI, you could google "secure rmi" - use a SSL socket factory for instance. If you just want authentication (cleartext+signature), you might even be able to write a authenticating socket factory...
If you have no clue about security, the simplest solution might be to set up a secure tunnel using a VPN or ssh, and send your messages using that.