if (key.endsWith(ext)) {
if (key.endsWith(ext.toLowerCase())) {
    public Object getWriterFor(String ext) throws Exception {        Iterator itr = writerFormats.keySet().iterator();        while (itr.hasNext()) {            String key = (String)itr.next();            if (key.endsWith(ext)) {                return loadClass((String)writerFormats.get(key)).newInstance();            }        }        throw new Exception(                "No writer plugin exists for the extension: " + ext);    }