code: public synchronized void importModule(String name, byte[] content) throws CmsException {
  
          String moduleName = null;
          boolean ok = true;
          try {
              if (content.length == 0) {
                  // Happens when using CmsResourceWrapperModules with JLAN and createResource is called
                  LOG.debug("Zero-length module import content, ignoring it...");
              } else {
                  ensureFoldersExist();
                  String targetFilePath = createImportZipPath(name);
                  try {
                      FileOutputStream out = new FileOutputStream(new File(targetFilePath));
                      out.write(content);
                      out.close();
                  } catch (IOException e) {
                      throw new CmsImportExportException(
                          Messages.get().container(Messages.ERR_FILE_IO_1, targetFilePath));
                  }
                  CmsModule module = CmsModuleImportExportHandler.readModuleFromImport(targetFilePath);
                  moduleName = module.getName();
                  I_CmsReport report = createReport();
                  OpenCms.getModuleManager().replaceModule(m_adminCms, targetFilePath, report);
                  new File(targetFilePath).delete();
                  if (report.hasError() || report.hasWarning()) {
                      ok = false;
                  }
              }
          } catch (CmsException e) {
              ok = false;
              throw e;
          } catch (RuntimeException e) {
              ok = false;
              throw e;
          } finally {
              m_moduleLog.log(moduleName, Action.importModule, ok);
          }
      }
docs: Imports module data.<p>
  
  @param name the module file name
  @param content the module ZIP file data
  @throws CmsException if something goes wrong