Code example for InvalidParameterSpecException

0
            if (paramSpec == PSSParameterSpec.class && currentSpec != null)
            { 
                return currentSpec;
            } 
     
            throw new InvalidParameterSpecException("unknown parameter spec passed to PSS parameters object.");
        } 
     
        protected void engineInit( 
            AlgorithmParameterSpec paramSpec)
            throws InvalidParameterSpecException 
        { 
            if (!(paramSpec instanceof PSSParameterSpec))
            { 
                throw new InvalidParameterSpecException("PSSParameterSpec required to initialise an PSS algorithm parameters object");
            } 
     
            this.currentSpec = (PSSParameterSpec)paramSpec;
        } 
     
        protected void engineInit(