code: public static PrivateKey loadPrivateKeyFromKeyStore(
        KeyStore keyStore, InputStream keyStream, String storePass, String alias, String keyPass)
        throws IOException, GeneralSecurityException {
      loadKeyStore(keyStore, keyStream, storePass);
      return getPrivateKey(keyStore, alias, keyPass);
    }
docs: Retrieves a private key from the specified key store stream and specified key store.
  
  @param keyStore key store
  @param keyStream input stream to the key store (closed at the end of this method in a finally
  block)
  @param storePass password protecting the key store file
  @param alias alias under which the key is stored
  @param keyPass password protecting the key
  @return key from the key store