Code example for KeyStore

Methods: containsAlias

0
  public boolean containsKey(String alias)
  { 
    boolean exists = false;
    try 
    { 
      exists = keyStore.containsAlias(alias);
    } 
    catch (KeyStoreException e)
    { 
      throw new KeyAccessException("A key could not be read from the keystore.", e);
    } 
 
    return exists;
  } 
 
  /** 
   * Returns the secret key as aliased by the input. 
   *  
   * @param alias 
   * @return 
   */