private void stopOut ( ) throws IOException { if ( outClosed ) { return ; } outClosed = true ; LOG . log ( Level . FINE , "Shutting down socket for output" ) ; // close socket for output - that will initiate normal socket close procedure; in case of TCP // socket this is // a buffer flush and TCP termination socket . shutdownOutput ( ) ; }
Close socket for output and terminate connection any attempt to write anything to it after that will yield to IOException