protected final void throwUnpairedSurrogate(int code) throws IOException { // Let's flush to make debugging easier flush(); throw new IOException("Unpaired surrogate character (0x"+Integer.toHexString(code)+")"); }
public void close(boolean forceRealClose) throws IOException { flush(); // Buffers to free? byte[] buf = mOutputBuffer; if (buf != null) { mOutputBuffer = null; mConfig.freeFullBBuffer(buf); } // Plus may need to close the actual stream if (forceRealClose || mAutoCloseOutput) { /* 14-Nov-2008, TSa: Wrt [WSTX-163]; no need to * check whether mOut implements CompletelyCloseable * (unlike with BufferingXmlWriter) */ mOut.close(); } }
/** * Non-validating version of typed write method */ public final void writeTypedElement(AsciiValueEncoder enc) throws IOException { if (mSurrogate != 0) { throwUnpairedSurrogate(); } if (enc.bufferNeedsFlush(mOutputBuffer.length - mOutputPtr)) { flush(); } while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBuffer.length); // If no flushing needed, indicates that all data was encoded if (enc.isCompleted()) { break; } flush(); } }
public void writeTypedAttribute(String localName, AsciiValueEncoder enc) throws IOException, XMLStreamException { writeAscii(BYTE_SPACE); writeName(localName); writeAscii(BYTE_EQ, BYTE_QUOT); if (enc.bufferNeedsFlush(mOutputBuffer.length - mOutputPtr)) { flush(); } while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBuffer.length); if (enc.isCompleted()) { break; } flush(); } writeAscii(BYTE_QUOT); }
public void writeTypedAttribute(String prefix, String localName, AsciiValueEncoder enc) throws IOException, XMLStreamException { writeAscii(BYTE_SPACE); writeName(prefix); writeAscii(BYTE_COLON); writeName(localName); writeAscii(BYTE_EQ, BYTE_QUOT); if (enc.bufferNeedsFlush(mOutputBuffer.length - mOutputPtr)) { flush(); } while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBuffer.length); if (enc.isCompleted()) { break; } flush(); } writeAscii(BYTE_QUOT); }
public void close() throws IOException { flush(); if (mAutoCloseOutput) { mOut.close(); } }
public void close() throws IOException { flush(); if (mAutoCloseOutput) { mOut.close(); } }
public void close() throws IOException { flush(); if (mAutoCloseOutput) { mOut.close(); } }
protected final void throwUnpairedSurrogate(int code) throws IOException { // Let's flush to make debugging easier flush(); throw new IOException("Unpaired surrogate character (0x"+Integer.toHexString(code)+")"); }
protected final void throwUnpairedSurrogate(int code) throws IOException { // Let's flush to make debugging easier flush(); throw new IOException("Unpaired surrogate character (0x"+Integer.toHexString(code)+")"); }
protected final void throwUnpairedSurrogate(int code) throws IOException { // Let's flush to make debugging easier flush(); throw new IOException("Unpaired surrogate character (0x"+Integer.toHexString(code)+")"); }
protected final void throwUnpairedSurrogate(int code) throws IOException { // Let's flush to make debugging easier flush(); throw new IOException("Unpaired surrogate character (0x"+Integer.toHexString(code)+")"); }
protected final void throwUnpairedSurrogate(int code) throws IOException { // Let's flush to make debugging easier flush(); throw new IOException("Unpaired surrogate character (0x"+Integer.toHexString(code)+")"); }
protected final void throwUnpairedSurrogate(int code) throws IOException { // Let's flush to make debugging easier flush(); throw new IOException("Unpaired surrogate character (0x"+Integer.toHexString(code)+")"); }
protected final void throwUnpairedSurrogate(int code) throws IOException { // Let's flush to make debugging easier flush(); throw new IOException("Unpaired surrogate character (0x"+Integer.toHexString(code)+")"); }
@Override public void close(boolean forceRealClose) throws IOException { flush(); // Buffers to free? byte[] buf = mOutputBuffer; if (buf != null) { mOutputBuffer = null; mConfig.freeFullBBuffer(buf); } // Plus may need to close the actual stream if (forceRealClose || mAutoCloseOutput) { /* 14-Nov-2008, TSa: Wrt [WSTX-163]; no need to * check whether mOut implements CompletelyCloseable * (unlike with BufferingXmlWriter) */ mOut.close(); } }
@Override public void close(boolean forceRealClose) throws IOException { flush(); // Buffers to free? byte[] buf = mOutputBuffer; if (buf != null) { mOutputBuffer = null; mConfig.freeFullBBuffer(buf); } // Plus may need to close the actual stream if (forceRealClose || mAutoCloseOutput) { /* 14-Nov-2008, TSa: Wrt [WSTX-163]; no need to * check whether mOut implements CompletelyCloseable * (unlike with BufferingXmlWriter) */ mOut.close(); } }
@Override public void writeTypedAttribute(String localName, AsciiValueEncoder enc) throws IOException, XMLStreamException { writeAscii(BYTE_SPACE); writeName(localName); writeAscii(BYTE_EQ, BYTE_QUOT); if (enc.bufferNeedsFlush(mOutputBuffer.length - mOutputPtr)) { flush(); } while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBuffer.length); if (enc.isCompleted()) { break; } flush(); } writeAscii(BYTE_QUOT); }
@Override public void writeTypedAttribute(String localName, AsciiValueEncoder enc) throws IOException, XMLStreamException { writeAscii(BYTE_SPACE); writeName(localName); writeAscii(BYTE_EQ, BYTE_QUOT); if (enc.bufferNeedsFlush(mOutputBuffer.length - mOutputPtr)) { flush(); } while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBuffer.length); if (enc.isCompleted()) { break; } flush(); } writeAscii(BYTE_QUOT); }
public void writeTypedAttribute(String localName, AsciiValueEncoder enc) throws IOException, XMLStreamException { writeAscii(BYTE_SPACE); writeName(localName); writeAscii(BYTE_EQ, BYTE_QUOT); if (enc.bufferNeedsFlush(mOutputBuffer.length - mOutputPtr)) { flush(); } while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBuffer.length); if (enc.isCompleted()) { break; } flush(); } writeAscii(BYTE_QUOT); }