code: protected XMLEvent createNextEvent(boolean checkEOD, int type)
          throws XMLStreamException
      {
          try {
              XMLEvent evt = mAllocator.allocate(mReader);
              if (checkEOD && type == END_DOCUMENT) {
                  updateStateEndDocument();
              }
              return evt;
          } catch (RuntimeException rex) {
              throw _checkUnwrap(rex);
          }
      }
docs: /*
  ********************************************************************
  /* Overridable factory methods
  ********************************************************************