code: public final KeyStore retrieveKeyStore(InputStream input, char[] password) throws IOException {
          logger.entry();
          try {
              KeyStore keyStore = KeyStore.getInstance(KEY_STORE_FORMAT);
              keyStore.load(input, password);
              logger.exit();
              return keyStore;
          } catch (KeyStoreException | NoSuchAlgorithmException | CertificateException e) {
              RuntimeException exception = new RuntimeException("An unexpected exception occurred while attempting to retrieve a keystore.", e);
              logger.error(exception.toString());
              throw exception;
          }
      }
docs: This method retrieves a PKCS12 format key store from an input stream.
  
  @param input The input stream from which to read the key store.
  @param password The password that was used to encrypt the file.
  @return The PKCS12 format key store.
  @throws java.io.IOException Unable to retrieve the key store from the specified input stream.