public static SSLServerSocketFactory makeSSLSocketFactory(KeyStore loadedKeyStore,KeyManagerFactory loadedKeyFactory) throws IOException {
  try {
    return makeSSLSocketFactory(loadedKeyStore,loadedKeyFactory.getKeyManagers());
  }
 catch (  Exception e) {
    throw new IOException(e.getMessage());
  }
}

public static SSLServerSocketFactory makeSSLSocketFactory ( KeyStore loadedKeyStore , KeyManagerFactory loadedKeyFactory ) throws IOException { try { return makeSSLSocketFactory ( loadedKeyStore , loadedKeyFactory . getKeyManagers ( ) ) ; } catch ( Exception e ) { throw new IOException ( e . getMessage ( ) ) ; } }
creates an sslsocketfactory for https . pass a loaded keystore and a loaded keymanagerfactory . these objects must properly loaded / initialized by the caller .
