code: public void close() {
          try {
              initFooter(); // line added by David Freels
              addTabs(1);
              writeEnd(HtmlTags.BODY);
              os.write(NEWLINE);
              writeEnd(HtmlTags.HTML);
              super.close();
          }
          catch(IOException ioe) {
              throw new ExceptionConverter(ioe);
          }
      }
docs: Signals that the <CODE>Document</CODE> was closed and that no other
  <CODE>Elements</CODE> will be added.