code: public void writeDocument(OutputStream out) {
          try {
              out.write(OPEN_GROUP);
              out.write(RtfDocument.RTF_DOCUMENT);
              this.documentHeader.writeContent(out);
              this.data.writeTo(out);
              out.write(CLOSE_GROUP);
          } catch(IOException ioe) {
              ioe.printStackTrace();
          }
      }
docs: Writes the document
  
  @param out The <code>OutputStream</code> to write the RTF document to.