docs: public void writeXML(File file) throws IOException {
          OutputStream out = new FileOutputStream(file);
          if (file.getName().endsWith(".gz")) {
              out = new GZIPOutputStream(out);
          }
          writeXML(out);
      }