network socket script using java