public static KeyStore loadKeystore(final String keyStoreFile,final String keyStorePassword,final KeyStoreTypeEnum keyStoreType) throws IOException, KeyStoreException, NoSuchAlgorithmException, CertificateException {
  final FileInputStream inputStream=new FileInputStream(keyStoreFile);
  KeyStore keyStore;
  try {
    keyStore=getKeyStoreInstance(keyStoreType);
    keyStore.load(inputStream,keyStorePassword.toCharArray());
  }
  finally {
    if (inputStream != null) {
      inputStream.close();
    }
  }
  return keyStore;
}

public static KeyStore loadKeystore ( final String keyStoreFile , final String keyStorePassword , final KeyStoreTypeEnum keyStoreType ) throws IOException , KeyStoreException , NoSuchAlgorithmException , CertificateException { final FileInputStream inputStream = new FileInputStream ( keyStoreFile ) ; KeyStore keyStore ; try { keyStore = getKeyStoreInstance ( keyStoreType ) ; keyStore . load ( inputStream , keyStorePassword . toCharArray ( ) ) ; } finally { if ( inputStream != null ) { inputStream . close ( ) ; } } return keyStore ; }
loads a key store from the specified location and using the given password .
