public XMLStreamReader2 createSR(ReaderConfig cfg, String systemId, InputBootstrapper bs,
    		boolean forER, boolean autoCloseInput)
        throws XMLStreamException
    {
        // 16-Aug-2004, TSa: Maybe we have a context?
        URL src = cfg.getBaseURL();

        // If not, maybe we can derive it from system id?
        if ((src == null) && (systemId != null && systemId.length() > 0)) {
            try {
                src = URLUtil.urlFromSystemId(systemId);
            } catch (IOException ie) {
                throw new WstxIOException(ie);
            }
        }
        return doCreateSR(cfg, SystemId.construct(systemId, src), bs, forER, autoCloseInput);
    }
public XMLStreamReader2 createSR ( ReaderConfig cfg , String systemId , InputBootstrapper bs , boolean forER , boolean autoCloseInput ) throws XMLStreamException { URL src = cfg . getBaseURL ( ) ; if ( ( src == null ) && ( systemId != null && systemId . length ( ) > 0 ) ) { try { src = URLUtil . urlFromSystemId ( systemId ) ; } catch ( IOException ie ) { throw new WstxIOException ( ie ) ; } } return doCreateSR ( cfg , SystemId . construct ( systemId , src ) , bs , forER , autoCloseInput ) ; }
Method that is eventually called to create a (full) stream read
instance.
<p>
Note: defined as public method because it needs to be called by
SAX implementation.

@param systemId System id used for this reader (if any)
@param bs Bootstrapper to use for creating actual underlying
physical reader
@param forER Flag to indicate whether it will be used via
Event API (will affect some configuration settings), true if it
will be, false if not (or not known)
@param autoCloseInput Whether the underlying input source should be
actually closed when encountering EOF, or when <code>close()</code>
is called. Will be true for input sources that are automatically
managed by stream reader (input streams created for
{@link java.net.URL} and {@link java.io.File} arguments, or when
configuration settings indicate auto-closing is to be enabled
(the default value is false as per Stax 1.0 specs).