question: private void checkOpenAndCreate ( boolean create ) throws SocketException { if ( isClosed ( ) ) { throw new SocketException ( "Socket is closed" ) ; } if ( ! create ) { if ( ! isConnected ( ) ) { throw new SocketException ( "Socket is not connected" ) ; } return ; } if ( isCreated ) { return ; } synchronized ( this ) { if ( isCreated ) { return ; } try { impl . create ( true ) ; } catch ( SocketException e ) { throw e ; } catch ( IOException e ) { throw new SocketException ( e . toString ( ) ) ; } isCreated = true ; } }
target:  Checks whether the socket is closed, and throws an exception. Otherwise creates the underlying SocketImpl.