code: public void convertClass(TypeElement te, DocPath outputdir)
              throws DocFileIOException, SimpleDocletException {
          if (te == null) {
              return;
          }
          FileObject fo = utils.getFileObject(te);
          if (fo == null)
              return;
  
          try {
              Reader r = fo.openReader(true);
              int lineno = 1;
              String line;
              relativePath = DocPaths.SOURCE_OUTPUT
                      .resolve(DocPath.forPackage(utils, te))
                      .invert();
              Content body = getHeader();
              Content pre = new HtmlTree(HtmlTag.PRE);
              try (LineNumberReader reader = new LineNumberReader(r)) {
                  while ((line = reader.readLine()) != null) {
                      addLineNo(pre, lineno);
                      addLine(pre, line, lineno);
                      lineno++;
                  }
              }
              addBlankLines(pre);
              Content div = HtmlTree.DIV(HtmlStyle.sourceContainer, pre);
              body.addContent((configuration.allowTag(HtmlTag.MAIN)) ? HtmlTree.MAIN(div) : div);
              writeToFile(body, outputdir.resolve(DocPath.forClass(utils, te)));
          } catch (IOException e) {
              String message = configuration.resources.getText("doclet.exception.read.file", fo.getName());
              throw new SimpleDocletException(message, e);
          }
      }
docs: Convert the given Class to an HTML.
  
  @param te the class to convert.
  @param outputdir the name of the directory to output to
  @throws DocFileIOException if there is a problem generating the output file
  @throws SimpleDocletException if there is a problem reading the source file