code: protected void updateStateEndDocument() throws XMLStreamException {
          if (mCfgMultiDocMode) {
              // As per [woodstox-core#42] should allow reading over multiple documents...
              if (mReader.hasNext()) {
                  // Let's sanity-check that we get token we expect however:
                  int next = mReader.next();
                  if (next == START_DOCUMENT) {
                      mPrePeekEvent = START_DOCUMENT;
                      mPeekedEvent = createStartDocumentEvent();
                      mState = STATE_CONTENT;
                      return;
                  }
                  reportProblem("Unexpected token ("+ErrorConsts.tokenTypeDesc(next)
                      +") after END_DOCUMENT in multi-document mode, XMLStreamReader.hasNext() returning true");
              }
          }
          mState = STATE_END_OF_INPUT;
      }
docs: Method called when we are about to return <code>END_DOCUMENT</code> event.
  Usually this should change state to <code>STATE_END_OF_INPUT</code>, but
  may vary for some alternative read modes (like multi-document)
  
  @since 4.2