code: public void write() throws Exception {
      PrintWriter out;
      String output = output();
  
      if (outFile != null) {
        out = new PrintWriter(Files.newBufferedWriter(outFile.toPath(), UTF_8));
      } else if (inPlace) {
        assert docFile != null
            : "@AssumeAssertion(nullness): dependent: docFile is non-null if inPlace is true";
        out = new PrintWriter(Files.newBufferedWriter(docFile.toPath(), UTF_8));
      } else {
        out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out, UTF_8)));
      }
  
      out.println(output);
      out.flush();
      out.close();
    }
docs: Write the output of this doclet to the correct file.
  
  @throws Exception if there is trouble