code: public void replay() {
  
          int index = 0;
          for (MessageType type : typeBuffer) {
              switch (type) {
              case RECORD_START:
                  getReceiver().startRecord(valueBuffer.get(index));
                  ++index;
                  break;
              case RECORD_END:
                  getReceiver().endRecord();
                  break;
  
              case ENTITY_START:
                  getReceiver().startEntity(valueBuffer.get(index));
                  ++index;
                  break;
              case ENTITY_END:
                  getReceiver().endEntity();
                  break;
              default:
                  getReceiver().literal(valueBuffer.get(index), valueBuffer.get(index+1));
                  index +=2;
                  break;
              }
          }
      }
docs: Replays the buffered event.