Simpler way to read/write java sockets