Enumeration enum = props.keys(); while (enum.hasMoreElements()) { String propertyName = (String) enum.nextElement();
Enumeration propertyEnum = props.keys(); while (propertyEnum.hasMoreElements()) { String propertyName = (String) propertyEnum.nextElement();
    public static Properties getPropertiesStartingWith(String str, Properties props) {        if (str == null) {            throw new NullPointerException("str cannot be null");        }        if (props == null) {            throw new NullPointerException("props cannot be null");        }        Properties subset = new Properties();        Enumeration enum = props.keys();        while (enum.hasMoreElements()) {            String propertyName = (String) enum.nextElement();            if (propertyName.startsWith(str)) {                subset.put(propertyName, props.get(propertyName));            }        }