Java Network Programming code with some minor modifications.