I would try one more tweak to this scheme: wrap your ByteArrayOutputStream with a GZIPOutputStream, then with an ObjectOutputStream. This will probably shrink your 1.6 MB buffer significantly, especially if you have a good bit of text data in the stream. Then on the other end, wrap your ByteArrayInputStream with a GZIPInputStream, then an ObjectInputStream, to decode. I think that even lengthy computation on each end trumps fast network transmission every time, because it will nearly always be faster.
[Message sent by forum member 'jkeatley' (jkeatley)]
http://forums.java.net/jive/thread.jspa?messageID=255784