Great little example.
The only problem I've found is that binary numbers >127 get mapped to zero on read. I found that replacing
mssg(i) = jTcpObj.dataInputStream.readByte;
with
mssg(i) = read( jTcpObj.dataInputStream );
(in jtcp_read(), line 396)
solves this issue, but I don't know if this is the right thing to do...