code: public static void loadKeyStore(KeyStore keyStore, InputStream keyStream, String storePass)
        throws IOException, GeneralSecurityException {
      try {
        keyStore.load(keyStream, storePass.toCharArray());
      } finally {
        keyStream.close();
      }
    }
docs: Loads a key store from a stream.
  
  <p>Example usage:
  
  <pre>
  KeyStore keyStore = SecurityUtils.getJavaKeyStore();
  SecurityUtils.loadKeyStore(keyStore, new FileInputStream("certs.jks"), "password");
  </pre>
  
  @param keyStore key store
  @param keyStream input stream to the key store stream (closed at the end of this method in a
  finally block)
  @param storePass password protecting the key store file