AsyncInputFeeder feeder = _streamReader.getInputFeeder();
if (!feeder.needMoreInput()) {
fail("Got EVENT_INCOMPLETE, could not feed more input");
}
if (_offset >= _xml.length) { // end-of-input?
feeder.endOfInput();
} else {
int amount = Math.min(_bytesPerFeed, _xml.length - _offset);
feeder.feedInput(_xml, _offset, amount);
_offset += amount;
}