public static KeyStore load(File keyStoreFile,Password password) throws CryptoException, FileNotFoundException {
  KeyStoreType keyStoreType=null;
  try {
    keyStoreType=CryptoFileUtil.detectKeyStoreType(new FileInputStream(keyStoreFile));
  }
 catch (  FileNotFoundException ex) {
    throw ex;
  }
catch (  IOException ex) {
    throw new CryptoException(res.getString("NoLoadKeyStore.exception.message"),ex);
  }
  if (keyStoreType == null) {
    return null;
  }
  return load(keyStoreFile,password,keyStoreType);
}

public static KeyStore load ( File keyStoreFile , Password password ) throws CryptoException , FileNotFoundException { KeyStoreType keyStoreType = null ; try { keyStoreType = CryptoFileUtil . detectKeyStoreType ( new FileInputStream ( keyStoreFile ) ) ; } catch ( FileNotFoundException ex ) { throw ex ; } catch ( IOException ex ) { throw new CryptoException ( res . getString ( "NoLoadKeyStore.exception.message" ) , ex ) ; } if ( keyStoreType == null ) { return null ; } return load ( keyStoreFile , password , keyStoreType ) ; }
load a keystore , auto - detecting the type , from a file accessed by a password .
