private XMLStreamReader parse(InputStream is, String systemIdStr, boolean restricted) throws IOException, XMLStreamException { if (!quietmode) { LOG.debug("parsing input stream " + is); } if (is == null) { return null; } SystemId systemId = SystemId.construct(systemIdStr); ReaderConfig readerConfig = XML_INPUT_FACTORY.createPrivateConfig(); if (restricted) { readerConfig.setProperty(XMLInputFactory.SUPPORT_DTD, false); } return XML_INPUT_FACTORY.createSR(readerConfig, systemId, StreamBootstrapper.getInstance(null, systemId, is), false, true); }
public static SystemId construct(String systemId, URL url) { if (systemId == null && url == null) { return null; } return new SystemId(systemId, url); }
public URL getSource() throws IOException { return (mSystemId == null) ? null : mSystemId.asURL(); }
public WstxInputLocation(WstxInputLocation ctxt, String pubId, SystemId sysId, long charOffset, int row, int col) { mContext = ctxt; mPublicId = pubId; mSystemId = (sysId == null) ? "N/A" : sysId.toString(); mCharOffset = charOffset; mCol = col; mRow = row; }
public String getSystemId() { return (mSystemId == null) ? null : mSystemId.toString(); }
public void overrideSource(URL src) { //19-May-2014, tatu: I assume this should also override observed systemId... mSystemId = SystemId.construct(src); }
public static SystemId construct(String systemId) { return (systemId == null) ? null : new SystemId(systemId, null); }
public WstxInputLocation(WstxInputLocation ctxt, String pubId, SystemId sysId, long charOffset, int row, int col) { mContext = ctxt; mPublicId = pubId; mSystemId = (sysId == null) ? "N/A" : sysId.toString(); mCharOffset = charOffset; mCol = col; mRow = row; }
@Override public URL getSource() throws IOException { return (mSystemId == null) ? null : mSystemId.asURL(); }
public XMLStreamReader createXMLStreamReader(String systemId, Reader r) throws XMLStreamException { // false for auto-close, since caller has access to the Reader return createSR(SystemId.construct(systemId), r, false, false); }
public static SystemId construct(URL url) { return (url == null) ? null : new SystemId(null, url); }
public WstxInputLocation(WstxInputLocation ctxt, String pubId, SystemId sysId, long charOffset, int row, int col) { mContext = ctxt; mPublicId = pubId; mSystemId = (sysId == null) ? "N/A" : sysId.toString(); mCharOffset = charOffset; mCol = col; mRow = row; }
public URL getSource() throws IOException { return (mSystemId == null) ? null : mSystemId.asURL(); }
public XMLStreamReader createXMLStreamReader(String systemId, InputStream in) throws XMLStreamException { // false for auto-close, since caller has access to the input stream return createSR(SystemId.construct(systemId), in, null, false, false); }
public static SystemId construct(String systemId, URL url) { if (systemId == null && url == null) { return null; } return new SystemId(systemId, url); }
public WstxInputLocation(WstxInputLocation ctxt, String pubId, SystemId sysId, long charOffset, int row, int col) { mContext = ctxt; mPublicId = pubId; mSystemId = (sysId == null) ? "N/A" : sysId.toString(); mCharOffset = charOffset; mCol = col; mRow = row; }
@Override public URL getSource() throws IOException { return (mSystemId == null) ? null : mSystemId.asURL(); }
/** * Factory method usually used to expand internal parsed entities; in * which case context remains mostly the same. */ public static WstxInputSource constructCharArraySource (WstxInputSource parent, String fromEntity, char[] text, int offset, int len, Location loc, URL src) { SystemId sysId = SystemId.construct(loc.getSystemId(), src); return new CharArraySource(parent, fromEntity, text, offset, len, loc, sysId); } }
public static SystemId construct(String systemId, URL url) { if (systemId == null && url == null) { return null; } return new SystemId(systemId, url); }
public WstxInputLocation(WstxInputLocation ctxt, String pubId, SystemId sysId, long charOffset, int row, int col) { mContext = ctxt; mPublicId = pubId; mSystemId = (sysId == null) ? "N/A" : sysId.toString(); mCharOffset = charOffset; mCol = col; mRow = row; }