code: public void close() {
          if (mWithBody) {
              mOut.println("</BODY>");
          }
          mOut.println("</HTML>");
          mOut.close();
          mOut = null;
      }
docs: Writes HTML body ending tag if needed and HTML footer and closes file.