Stax2ByteArraySource src = new Stax2ByteArraySource(data, offset, len);
if (mStax2Factory != null) {
return (XMLStreamReader2) mStax2Factory.createXMLStreamReader(src);
}
try {
XMLStreamReader sr = mStaxFactory.createXMLStreamReader(src.constructInputStream());
return Stax2ReaderAdapter.wrapIfNecessary(sr);
} catch (IOException ioe) {
throw new XMLStreamException(ioe);
}
}