* this StaxMate factory was constructed with.
*/
public XMLStreamReader2 createStax2Reader(byte[] data, int offset, int len)
throws XMLStreamException
{
Stax2ByteArraySource src = new Stax2ByteArraySource(data, offset, len);
if (_stax2Factory != null) {
return (XMLStreamReader2) _stax2Factory.createXMLStreamReader(src);
}
try {
XMLStreamReader sr = _staxFactory.createXMLStreamReader(src.constructInputStream());
return wrapIfNecessary(sr);
} catch (IOException ioe) {
throw new XMLStreamException(ioe);
}
}