code: public void flushRows(final XMLUtil util, final ZipUTF8Writer writer,
                            final SettingsElement settingsElement) throws IOException {
          this.ensureContentBegin(util, writer);
          final int lastTableIndex = this.tables.size() - 1;
          if (lastTableIndex == -1) return;
  
          int tableIndex = this.flushPosition.getTableIndex();
          Table table = this.tables.get(tableIndex);
          if (tableIndex < lastTableIndex) {
              table.flushRemainingRowsFrom(util, writer, this.flushPosition.getLastRowIndex() + 1);
              settingsElement.addTableConfig(table.getConfigEntry());
              tableIndex++;
              while (tableIndex < lastTableIndex) {
                  table = this.tables.get(tableIndex);
                  table.appendXMLToContentEntry(util, writer);
                  settingsElement.addTableConfig(table.getConfigEntry());
                  tableIndex++;
              }
              table = this.tables.get(lastTableIndex);
              table.flushAllAvailableRows(util, writer);
          } else {
              table.flushSomeAvailableRowsFrom(util, writer, this.flushPosition.getLastRowIndex() + 1);
          }
          this.flushPosition.set(lastTableIndex, this.tables.get(lastTableIndex).getLastRowNumber());
      }
docs: Flush the rows from the last position to the current position
  
  @param util            the XML util
  @param writer          the destination
  @param settingsElement the settings.xml representation
  @throws IOException if the rows were not flushed