Code example for InvalidParameterSpecException

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