public Map<String, String> toMap() {
        HashMap<String, String> ret = new HashMap<String, String>();
        for (Enumeration<?> e = propertyNames(); e.hasMoreElements();) {
            String key = (String) e.nextElement();
            String prop = getProperty(key);
            if (key != null && prop != null)
                ret.put(key, prop);
        }
        return ret;
    }