public final void close() throws IOException { mWriter.close(false); }
mWriter.enableXml11(); mWriter.writeXmlDeclaration(version, encoding, standAlone); } catch (IOException ioe) { throw new WstxIOException(ioe);
public final void flush() throws IOException { mWriter.flush(); }
public XMLStreamLocation2 getLocation() { return new WstxInputLocation(null, // no parent null, (String) null, // pub/sys ids not yet known mWriter.getAbsOffset(), mWriter.getRow(), mWriter.getColumn()); }
public Object getProperty(String name) { /* These properties just exist for interoperability with * toolkits that were designed to work with Sun's parser (which * introduced properties) */ if (name.equals(WstxOutputProperties.P_OUTPUT_UNDERLYING_STREAM)) { return mWriter.getOutputStream(); } if (name.equals(WstxOutputProperties.P_OUTPUT_UNDERLYING_WRITER)) { return mWriter.getWriter(); } return mConfig.getProperty(name); }
public int getColumn() { return (getOutputPtr() - mLocRowStartOffset) + 1; }
/** * Method called to verify that the name is a legal XML name. */ public final void verifyNameValidity(String name, boolean checkNs) throws XMLStreamException { /* No empty names... caller must have dealt with optional arguments * prior to calling this method */ if (name == null || name.length() == 0) { reportNwfName(ErrorConsts.WERR_NAME_EMPTY); } int illegalIx = WstxInputData.findIllegalNameChar(name, checkNs, mXml11); if (illegalIx >= 0) { if (illegalIx == 0) { reportNwfName(ErrorConsts.WERR_NAME_ILLEGAL_FIRST_CHAR, WstxInputData.getCharDesc(name.charAt(0))); } reportNwfName(ErrorConsts.WERR_NAME_ILLEGAL_CHAR, WstxInputData.getCharDesc(name.charAt(illegalIx))); } }
public XMLStreamLocation2 getLocation() { return new WstxInputLocation(null, // no parent null, null, // pub/sys ids not yet known mWriter.getAbsOffset(), mWriter.getRow(), mWriter.getColumn()); }
public Object getProperty(String name) { if (name.equals(WstxOutputProperties.P_OUTPUT_UNDERLYING_STREAM)) { return mWriter.getOutputStream(); } if (name.equals(WstxOutputProperties.P_OUTPUT_UNDERLYING_WRITER)) { return mWriter.getWriter(); } return mConfig.getProperty(name); }
public int getAbsOffset() { return mLocPastChars +getOutputPtr(); }
/** * Method called to verify that the name is a legal XML name. */ public final void verifyNameValidity(String name, boolean checkNs) throws XMLStreamException { /* No empty names... caller must have dealt with optional arguments * prior to calling this method */ if (name == null || name.length() == 0) { reportNwfName(ErrorConsts.WERR_NAME_EMPTY); } int illegalIx = WstxInputData.findIllegalNameChar(name, checkNs, mXml11); if (illegalIx >= 0) { if (illegalIx == 0) { reportNwfName(ErrorConsts.WERR_NAME_ILLEGAL_FIRST_CHAR, WstxInputData.getCharDesc(name.charAt(0))); } reportNwfName(ErrorConsts.WERR_NAME_ILLEGAL_CHAR, WstxInputData.getCharDesc(name.charAt(illegalIx))); } }
public XMLStreamLocation2 getLocation() { return new WstxInputLocation(null, // no parent null, null, // pub/sys ids not yet known mWriter.getAbsOffset(), mWriter.getRow(), mWriter.getColumn()); }
public Object getProperty(String name) { if (name.equals(WstxOutputProperties.P_OUTPUT_UNDERLYING_STREAM)) { return mWriter.getOutputStream(); } if (name.equals(WstxOutputProperties.P_OUTPUT_UNDERLYING_WRITER)) { return mWriter.getWriter(); } return mConfig.getProperty(name); }
mWriter.enableXml11(); mWriter.writeXmlDeclaration(version, encoding, standAlone); } catch (IOException ioe) { throw new WstxIOException(ioe);
protected void throwOutputError(String msg) throws XMLStreamException { // First, let's flush any output we may have, to make debugging easier try { flush(); } catch (IOException ioe) { throw new WstxIOException(ioe); } throw new XMLStreamException(msg); }
@Override public final void close() throws IOException { mWriter.close(false); }
public int getColumn() { return (getOutputPtr() - mLocRowStartOffset) + 1; }
/** * Method called to verify that the name is a legal XML name. */ public final void verifyNameValidity(String name, boolean checkNs) throws XMLStreamException { /* No empty names... caller must have dealt with optional arguments * prior to calling this method */ if (name == null || name.length() == 0) { reportNwfName(ErrorConsts.WERR_NAME_EMPTY); } int illegalIx = WstxInputData.findIllegalNameChar(name, checkNs, mXml11); if (illegalIx >= 0) { if (illegalIx == 0) { reportNwfName(ErrorConsts.WERR_NAME_ILLEGAL_FIRST_CHAR, WstxInputData.getCharDesc(name.charAt(0))); } reportNwfName(ErrorConsts.WERR_NAME_ILLEGAL_CHAR, WstxInputData.getCharDesc(name.charAt(illegalIx))); } }
@Override public XMLStreamLocation2 getLocation() { return new WstxInputLocation(null, // no parent null, (String) null, // pub/sys ids not yet known mWriter.getAbsOffset(), mWriter.getRow(), mWriter.getColumn()); }
public Object getProperty(String name) { if (name.equals(WstxOutputProperties.P_OUTPUT_UNDERLYING_STREAM)) { return mWriter.getOutputStream(); } if (name.equals(WstxOutputProperties.P_OUTPUT_UNDERLYING_WRITER)) { return mWriter.getWriter(); } return mConfig.getProperty(name); }