I have a simple requirement of a software level port forwarding/tunnelling of socket based communication.
There is a TCP/IP port forwarding utility named portforward available in code.google.com. It is entirely written in Java.
code.google.com