New java networking stuff

From http://cs.lmu.edu/~ray/notes/javanetexamples/