private static WstxInputSource sourceFromURL(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, URL url, String pubId) throws IOException, XMLStreamException { /* And then create the input source. Note that by default URL's * own input stream creation creates buffered reader -- for us * that's useless and wasteful (adds one unnecessary level of * caching, halving the speed due to copy operations needed), so * let's avoid it. */ InputStream in = URLUtil.inputStreamFromURL(url); SystemId sysId = SystemId.construct(url); StreamBootstrapper bs = StreamBootstrapper.getInstance(pubId, sysId, in); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, sysId, xmlVersion, r); }
private static WstxInputSource sourceFromIS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, InputStream is, String pubId, String sysId) throws IOException, XMLStreamException { StreamBootstrapper bs = StreamBootstrapper.getInstance(pubId, SystemId.construct(sysId), is); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); URL ctxt = parent.getSource(); // If we got a real sys id, we do know the source... if (sysId != null && sysId.length() > 0) { ctxt = URLUtil.urlFromSystemId(sysId, ctxt); } return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, SystemId.construct(sysId, ctxt), xmlVersion, r); }
private static WstxInputSource sourceFromURL(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, URL url, String pubId) throws IOException, XMLStreamException { /* And then create the input source. Note that by default URL's * own input stream creation creates buffered reader -- for us * that's useless and wasteful (adds one unnecessary level of * caching, halving the speed due to copy operations needed), so * let's avoid it. */ InputStream in = URLUtil.optimizedStreamFromURL(url); String sysId = url.toExternalForm(); StreamBootstrapper bs = StreamBootstrapper.getInstance(in, pubId, sysId); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, sysId, xmlVersion, url, r); }
private static WstxInputSource sourceFromURL(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, URL url, String pubId) throws IOException, XMLStreamException { /* And then create the input source. Note that by default URL's * own input stream creation creates buffered reader -- for us * that's useless and wasteful (adds one unnecessary level of * caching, halving the speed due to copy operations needed), so * let's avoid it. */ InputStream in = URLUtil.optimizedStreamFromURL(url); String sysId = url.toExternalForm(); StreamBootstrapper bs = StreamBootstrapper.getInstance(in, pubId, sysId); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, sysId, xmlVersion, url, r); }
private static WstxInputSource sourceFromURL(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, URL url, String pubId) throws IOException, XMLStreamException { /* And then create the input source. Note that by default URL's * own input stream creation creates buffered reader -- for us * that's useless and wasteful (adds one unnecessary level of * caching, halving the speed due to copy operations needed), so * let's avoid it. */ InputStream in = URLUtil.optimizedStreamFromURL(url); String sysId = url.toExternalForm(); StreamBootstrapper bs = StreamBootstrapper.getInstance(in, pubId, sysId); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, sysId, xmlVersion, url, r); }
private static WstxInputSource sourceFromIS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, InputStream is, String pubId, String sysId) throws IOException, XMLStreamException { StreamBootstrapper bs = StreamBootstrapper.getInstance(is, pubId, sysId); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); URL ctxt = parent.getSource(); // If we got a real sys id, we do know the source... if (sysId != null && sysId.length() > 0) { ctxt = URLUtil.urlFromSystemId(sysId, ctxt); } return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, sysId, xmlVersion, ctxt, r); }
private static WstxInputSource sourceFromIS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, InputStream is, String pubId, String sysId) throws IOException, XMLStreamException { StreamBootstrapper bs = StreamBootstrapper.getInstance(is, pubId, sysId); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); URL ctxt = parent.getSource(); // If we got a real sys id, we do know the source... if (sysId != null && sysId.length() > 0) { ctxt = URLUtil.urlFromSystemId(sysId, ctxt); } return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, sysId, xmlVersion, ctxt, r); }
private static WstxInputSource sourceFromIS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, InputStream is, String pubId, String sysId) throws IOException, XMLStreamException { StreamBootstrapper bs = StreamBootstrapper.getInstance(is, pubId, sysId); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); URL ctxt = parent.getSource(); // If we got a real sys id, we do know the source... if (sysId != null && sysId.length() > 0) { ctxt = URLUtil.urlFromSystemId(sysId, ctxt); } return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, sysId, xmlVersion, ctxt, r); }
private static WstxInputSource sourceFromIS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, InputStream is, String pubId, String sysId) throws IOException, XMLStreamException { StreamBootstrapper bs = StreamBootstrapper.getInstance(pubId, SystemId.construct(sysId), is); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); URL ctxt = parent.getSource(); // If we got a real sys id, we do know the source... if (sysId != null && sysId.length() > 0) { ctxt = URLUtil.urlFromSystemId(sysId, ctxt); } return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, SystemId.construct(sysId, ctxt), xmlVersion, r); }
private static WstxInputSource sourceFromURL(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, URL url, String pubId) throws IOException, XMLStreamException { /* And then create the input source. Note that by default URL's * own input stream creation creates buffered reader -- for us * that's useless and wasteful (adds one unnecessary level of * caching, halving the speed due to copy operations needed), so * let's avoid it. */ InputStream in = URLUtil.inputStreamFromURL(url); SystemId sysId = SystemId.construct(url); StreamBootstrapper bs = StreamBootstrapper.getInstance(pubId, sysId, in); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, sysId, xmlVersion, r); }
@SuppressWarnings("resource") private static WstxInputSource sourceFromIS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, InputStream is, String pubId, String sysId) throws IOException, XMLStreamException { StreamBootstrapper bs = StreamBootstrapper.getInstance(pubId, SystemId.construct(sysId), is); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); URL ctxt = parent.getSource(); // If we got a real sys id, we do know the source... if (sysId != null && sysId.length() > 0) { ctxt = URLUtil.urlFromSystemId(sysId, ctxt); } return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, SystemId.construct(sysId, ctxt), xmlVersion, r); }
@SuppressWarnings("resource") private static WstxInputSource sourceFromURL(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, URL url, String pubId) throws IOException, XMLStreamException { /* And then create the input source. Note that by default URL's * own input stream creation creates buffered reader -- for us * that's useless and wasteful (adds one unnecessary level of * caching, halving the speed due to copy operations needed), so * let's avoid it. */ InputStream in = URLUtil.inputStreamFromURL(url); SystemId sysId = SystemId.construct(url); StreamBootstrapper bs = StreamBootstrapper.getInstance(pubId, sysId, in); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, sysId, xmlVersion, r); }
@SuppressWarnings("resource") private static WstxInputSource sourceFromIS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, InputStream is, String pubId, String sysId) throws IOException, XMLStreamException { StreamBootstrapper bs = StreamBootstrapper.getInstance(pubId, SystemId.construct(sysId), is); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); URL ctxt = parent.getSource(); // If we got a real sys id, we do know the source... if (sysId != null && sysId.length() > 0) { ctxt = URLUtil.urlFromSystemId(sysId, ctxt); } return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, SystemId.construct(sysId, ctxt), xmlVersion, r); }
@SuppressWarnings("resource") private static WstxInputSource sourceFromURL(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, URL url, String pubId) throws IOException, XMLStreamException { /* And then create the input source. Note that by default URL's * own input stream creation creates buffered reader -- for us * that's useless and wasteful (adds one unnecessary level of * caching, halving the speed due to copy operations needed), so * let's avoid it. */ InputStream in = URLUtil.inputStreamFromURL(url); SystemId sysId = SystemId.construct(url); StreamBootstrapper bs = StreamBootstrapper.getInstance(pubId, sysId, in); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, sysId, xmlVersion, r); }
@SuppressWarnings("resource") private static WstxInputSource sourceFromURL(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, URL url, String pubId) throws IOException, XMLStreamException { /* And then create the input source. Note that by default URL's * own input stream creation creates buffered reader -- for us * that's useless and wasteful (adds one unnecessary level of * caching, halving the speed due to copy operations needed), so * let's avoid it. */ InputStream in = URLUtil.inputStreamFromURL(url); SystemId sysId = SystemId.construct(url); StreamBootstrapper bs = StreamBootstrapper.getInstance(pubId, sysId, in); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, sysId, xmlVersion, r); }
@SuppressWarnings("resource") private static WstxInputSource sourceFromIS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, InputStream is, String pubId, String sysId) throws IOException, XMLStreamException { StreamBootstrapper bs = StreamBootstrapper.getInstance(pubId, SystemId.construct(sysId), is); Reader r = bs.bootstrapInput(cfg, false, xmlVersion); URL ctxt = parent.getSource(); // If we got a real sys id, we do know the source... if (sysId != null && sysId.length() > 0) { ctxt = URLUtil.urlFromSystemId(sysId, ctxt); } return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, SystemId.construct(sysId, ctxt), xmlVersion, r); }