code: public void writeDefinition(final OutputStream result) throws IOException
      {
          result.write(OPEN_GROUP);
          result.write(LIST_TABLE);
          this.document.outputDebugLinebreak(result);
          
          for(int i = 0; i < picturelists.size(); i++) {
          	RtfPictureList l = (RtfPictureList)picturelists.get(i);
  //        	l.setID(document.getRandomInt());
          	l.writeDefinition(result);
          	this.document.outputDebugLinebreak(result);
          }
  
          for(int i = 0; i < lists.size(); i++) {
          	RtfList l = (RtfList)lists.get(i);
          	l.setID(document.getRandomInt());
          	l.writeDefinition(result);
          	this.document.outputDebugLinebreak(result);
          }
          result.write(CLOSE_GROUP);
          this.document.outputDebugLinebreak(result);
          
          result.write(OPEN_GROUP);
          result.write(LIST_OVERRIDE_TABLE);
          this.document.outputDebugLinebreak(result);
          
          // list override index values are 1-based, not 0.
          // valid list override index values \ls are 1 to 2000.
          // if there are more then 2000 lists, the result is undefined.
          for(int i = 0; i < lists.size(); i++) {
              result.write(OPEN_GROUP);
              result.write(LIST_OVERRIDE);
              result.write(RtfList.LIST_ID);
              result.write(intToByteArray( ((RtfList) lists.get(i)).getID() ));
              result.write(LIST_OVERRIDE_COUNT);
              result.write(intToByteArray(0));	// is this correct? Spec says valid values are 1 or 9.
              result.write(RtfList.LIST_NUMBER);
              result.write(intToByteArray( ((RtfList) lists.get(i)).getListNumber()) );
              result.write(CLOSE_GROUP);
              this.document.outputDebugLinebreak(result);
          }
          result.write(CLOSE_GROUP);
          this.document.outputDebugLinebreak(result);
      }
docs: Writes the list and list override tables.