code: protected boolean ensureInput(int minAmount)
          throws XMLStreamException
      {
          int currAmount = mInputEnd - mInputPtr;
          if (currAmount >= minAmount) {
              return true;
          }
          try {
              return mInput.readMore(this, minAmount);
          } catch (IOException ie) {
              throw constructFromIOE(ie);
          }
      }
docs: Method called to make sure current main-level input buffer has at
  least specified number of characters available consequtively,
  without having to call {@link #loadMore}. It can only be called
  when input comes from main-level buffer; further, call can shift
  content in input buffer, so caller has to flush any data still
  pending. In short, caller has to know exactly what it's doing. :-)
  <p>
  Note: method does not check for any other input sources than the
  current one -- if current source can not fulfill the request, a
  failure is indicated.
  
  @return true if there's now enough data; false if not (EOF)