Code example for InvalidParameterException

0
                { 
                    initialize((ECGenParameterSpec)ecParams, random);
                } 
                catch (InvalidAlgorithmParameterException e)
                { 
                    throw new InvalidParameterException("key size not configurable.");
                } 
            } 
            else 
            { 
                throw new InvalidParameterException("unknown key size.");
            } 
        } 
 
        public void initialize( 
            AlgorithmParameterSpec  params,
            SecureRandom            random)
            throws InvalidAlgorithmParameterException 
        { 
            // BEGIN android-added 
            if (random == null) {