code: public void write(String outputLocation, String format) throws ReportException {
          Format reportFormat = null;
          try {
              reportFormat = Format.valueOf(format.toUpperCase());
          } catch (IllegalArgumentException ex) {
              LOGGER.trace("ignore this exception", ex);
          }
  
          if (reportFormat != null) {
              write(outputLocation, reportFormat);
          } else {
              final File out = getReportFile(outputLocation, null);
              if (out.isDirectory()) {
                  throw new ReportException("Unable to write non-standard VSL output to a directory, please specify a file name");
              }
              processTemplate(format, out);
          }
  
      }
docs: Writes the dependency-check report to the given output location.
  
  @param outputLocation the path where the reports should be written
  @param format the format the report should be written in (XML, HTML,
  JSON, CSV, ALL) or even the path to a custom velocity template (either
  fully qualified or the template name on the class path).
  @throws ReportException is thrown if there is an error creating out the
  reports