code: public void writeContent(final OutputStream result) throws IOException
      {
          result.write(OPEN_GROUP);
          if(this.type == TYPE_HEADER) {
              if(this.displayAt == DISPLAY_ALL_PAGES) {
                  result.write(HEADER_ALL);
              } else if(this.displayAt == DISPLAY_FIRST_PAGE) {
                  result.write(HEADER_FIRST);
              } else if(this.displayAt == DISPLAY_LEFT_PAGES) {
                  result.write(HEADER_LEFT);
              } else if(this.displayAt == DISPLAY_RIGHT_PAGES) {
                  result.write(HEADER_RIGHT);
              }
          } else {
              if(this.displayAt == DISPLAY_ALL_PAGES) {
                  result.write(FOOTER_ALL);
              } else if(this.displayAt == DISPLAY_FIRST_PAGE) {
                  result.write(FOOTER_FIRST);
              } else if(this.displayAt == DISPLAY_LEFT_PAGES) {
                  result.write(FOOTER_LEFT);
              } else if(this.displayAt == DISPLAY_RIGHT_PAGES) {
                  result.write(FOOTER_RIGHT);
              }
          }
          result.write(DELIMITER);
          for(int i = 0; i < this.content.length; i++) {
              if(this.content[i] instanceof RtfBasicElement) {
              	RtfBasicElement rbe = (RtfBasicElement)this.content[i];
              	rbe.writeContent(result);
              }
          }
          result.write(CLOSE_GROUP);
      }
docs: Writes the content of this RtfHeaderFooter