A TCP Socket abstraction in Java