Code example for KeyStoreException

0
        if (ks == null && password == null) { 
            throw new NoSuchAlgorithmException(); 
        } 
 
        if (ks == null) { 
            throw new KeyStoreException(); 
        } 
 
        if (password == null) { 
            throw new UnrecoverableKeyException(); 
        } 
 
        isInitialized = true; 
    } 
 
    public void engineInit(ManagerFactoryParameters spec) 
            throws InvalidAlgorithmParameterException { 
        if (spec == null) { 
            throw new InvalidAlgorithmParameterException("Incorrect parameter"); 
        } 
        isInitialized = true;