} finally { if (is != null) { is.close(); }
    public void toIvyFile(InputStream is, Resource res, File destFile, ModuleDescriptor md) throws IOException, ParseException {        try {            Namespace ns = null;            if (md instanceof DefaultModuleDescriptor) {                DefaultModuleDescriptor dmd = (DefaultModuleDescriptor)md;                ns = dmd.getNamespace();            }            XmlModuleDescriptorUpdater.update(                    null,                    is,                     destFile,                     Collections.EMPTY_MAP,                     md.getStatus(),                     md.getResolvedModuleRevisionId().getRevision(),                     md.getResolvedPublicationDate(),                    ns,                    false);        } catch (SAXException e) {            ParseException ex = new ParseException("exception occured while parsing "+res, 0);            ex.initCause(e);            throw ex;        }    }