question: public SSLSocket createSSLSocket ( Socket socket ) throws IOException { SSLSocketFactory sf = ( ( SSLSocketFactory ) SSLSocketFactory . getDefault ( ) ) ; InetSocketAddress remoteAddress = ( InetSocketAddress ) socket . getRemoteSocketAddress ( ) ; SSLSocket s = ( SSLSocket ) ( sf . createSocket ( socket , remoteAddress . getHostName ( ) , socket . getPort ( ) , true ) ) ; s . setUseClientMode ( false ) ; s . setEnabledCipherSuites ( s . getSupportedCipherSuites ( ) ) ; return s ; }
target:  Create a SSL socket that wraps the existing socket. This method is called after the client issued the STARTTLS command. <p> Subclasses may override this method to configure the key stores, enabled protocols/ cipher suites, enforce client authentication, etc.