Regarding TCP socket (java.net.Socket) in Java. What's the design contract regarding the OutputStream object returned by getOutputStream()? Is it guaranteed to either successfully send the data (meaning the data actually gets to the remote host) or throw an exception? I'm worried about it failing silently in the event of a network failure. The documentation is a little thin which makes me suspect its platform dependent.