code: public static KeyStore getInstance(String type)
          throws KeyStoreException
      {
          try {
              Object[] objs = Security.getImpl(type, "KeyStore", (String)null);
              return new KeyStore((KeyStoreSpi)objs[0], (Provider)objs[1], type);
          } catch (NoSuchAlgorithmException nsae) {
              throw new KeyStoreException(type + " not found", nsae);
          } catch (NoSuchProviderException nspe) {
              throw new KeyStoreException(type + " not found", nspe);
          }
      }
docs: Returns a keystore object of the specified type.
  
  <p> This method traverses the list of registered security Providers,
  starting with the most preferred Provider.
  A new KeyStore object encapsulating the
  KeyStoreSpi implementation from the first
  Provider that supports the specified type is returned.
  
  <p> Note that the list of registered providers may be retrieved via
  the {@link Security#getProviders() Security.getProviders()} method.
  
  @param type the type of keystore.
  See the KeyStore section in the <a href=
  "{@docRoot}openjdk-redirect.html?v=8&path=/technotes/guides/security/StandardNames.html#KeyStore">
  Java Cryptography Architecture Standard Algorithm Name Documentation</a>
  for information about standard keystore types.
  
  @return a keystore object of the specified type.
  
  @exception KeyStoreException if no Provider supports a
  KeyStoreSpi implementation for the
  specified type.
  
  @see Provider