*/
ReaderConfig cfg = getNonSharedConfig(ss.getPublicId(), ss.getSystemId(), ss.getEncoding(), forEventReader, true);
// Byte arrays can be accessed VERY efficiently...
if (ss instanceof Stax2ByteArraySource) {
Stax2ByteArraySource bs = (Stax2ByteArraySource) ss;
return StreamReaderImpl.construct(ByteSourceBootstrapper.construct
(cfg, bs.getBuffer(), bs.getBufferStart(), bs.getBufferLength()));
}
if (ss instanceof Stax2CharArraySource) {
Stax2CharArraySource cs = (Stax2CharArraySource) ss;
return StreamReaderImpl.construct(CharSourceBootstrapper.construct
(cfg, cs.getBuffer(), cs.getBufferStart(), cs.getBufferLength()));