code: public static CmsModuleImportData readModuleData(CmsObject cms, String importFile, I_CmsReport report)
      throws CmsException {
  
          CmsModuleImportData result = new CmsModuleImportData();
          CmsModule module = CmsModuleImportExportHandler.readModuleFromImport(importFile);
          cms = OpenCms.initCmsObject(cms);
  
          String importSite = module.getImportSite();
          if (!CmsStringUtil.isEmptyOrWhitespaceOnly(importSite)) {
              cms.getRequestContext().setSiteRoot(importSite);
          } else {
              String siteToSet = cms.getRequestContext().getSiteRoot();
              if ("".equals(siteToSet)) {
                  siteToSet = "/";
              }
              module.setSite(siteToSet);
          }
          result.setModule(module);
          result.setCms(cms);
          CmsImportResourceDataReader importer = new CmsImportResourceDataReader(result);
          CmsImportParameters params = new CmsImportParameters(importFile, "/", false);
          importer.importData(cms, report, params); // This only reads the module data into Java objects
          return result;
  
      }
docs: Reads the module data from an import zip file.<p>
  
  @param cms the CMS context
  @param importFile the import file
  @param report the report to write to
  @return the module data
  @throws CmsException if something goes wrong