Code example for KeyStoreException

    protected void engineInit(KeyStore ks, char[] password)
            throws KeyStoreException, NoSuchAlgorithmException, 
            UnrecoverableKeyException { 
        if (password == null) {
            throw new KeyStoreException("Incorrect password");            
        if (ks == null) {
            throw new UnrecoverableKeyException("Incorrect keystore");
    protected void engineInit(ManagerFactoryParameters spec)
            throws InvalidAlgorithmParameterException { 
        if (spec == null) {
            throw new InvalidAlgorithmParameterException("Incorrect parameter");
        if (spec instanceof Parameters) {
            try { 
Connect your IDE to all the code out there  Get Codota for Java