public final void writeTypedElement(AsciiValueEncoder enc) throws IOException { if (mOut == null) { return; } int free = mOutputBufLen - mOutputPtr; if (enc.bufferNeedsFlush(free)) { flush(); } while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBufLen); // If no flushing needed, indicates that all data was encoded if (enc.isCompleted()) { break; } flush(); } }
public void close(boolean forceRealClose) throws IOException { flush(); mTextWriter = null; mAttrValueWriter = null; // Buffers to free? char[] buf = mOutputBuffer; if (buf != null) { mOutputBuffer = null; mConfig.freeFullCBuffer(buf); } // Plus may need to close the actual writer if (forceRealClose || mAutoCloseOutput) { /* 14-Nov-2008, TSa: To resolve [WSTX-163], need to have a way * to force UTF8Writer to close the underlying stream... */ if (mOut instanceof CompletelyCloseable) { ((CompletelyCloseable)mOut).closeCompletely(); } else { mOut.close(); } } }
public final void writeTypedElement(AsciiValueEncoder enc, XMLValidator validator, char[] copyBuffer) throws IOException, XMLStreamException { if (mOut == null) { return; } int free = mOutputBufLen - mOutputPtr; if (enc.bufferNeedsFlush(free)) { flush(); } int start = mOutputPtr; while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBufLen); // False -> can't be sure it's the whole remaining text validator.validateText(mOutputBuffer, start, mOutputPtr, false); if (enc.isCompleted()) { break; } flush(); start = mOutputPtr; } }
public void close() throws IOException { if (mOut != null) { // just in case it's called multiple times flush(); Writer w = mOut; mOut = null; mUnderlyingStream = null; mTextWriter = null; mAttrValueWriter = null; char[] buf = mOutputBuffer; mOutputBuffer = null; mConfig.freeFullCBuffer(buf); if (mAutoCloseOutput) { w.close(); } } }
public void close() throws IOException { if (mOut != null) { // just in case it's called multiple times flush(); Writer w = mOut; mOut = null; mUnderlyingStream = null; mTextWriter = null; mAttrValueWriter = null; char[] buf = mOutputBuffer; mOutputBuffer = null; mConfig.freeFullCBuffer(buf); if (mAutoCloseOutput) { w.close(); } } }
public void close() throws IOException { if (mOut != null) { // just in case it's called multiple times flush(); Writer w = mOut; mOut = null; mUnderlyingStream = null; mTextWriter = null; mAttrValueWriter = null; char[] buf = mOutputBuffer; mOutputBuffer = null; mConfig.freeFullCBuffer(buf); if (mAutoCloseOutput) { w.close(); } } }
public final void writeTypedElement(AsciiValueEncoder enc) throws IOException { if (mOut == null) { return; } int free = mOutputBufLen - mOutputPtr; if (enc.bufferNeedsFlush(free)) { flush(); } while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBufLen); // If no flushing needed, indicates that all data was encoded if (enc.isCompleted()) { break; } flush(); } }
@Override public final void writeTypedElement(AsciiValueEncoder enc) throws IOException { if (mOut == null) { return; } int free = mOutputBufLen - mOutputPtr; if (enc.bufferNeedsFlush(free)) { flush(); } while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBufLen); // If no flushing needed, indicates that all data was encoded if (enc.isCompleted()) { break; } flush(); } }
@Override public final void writeTypedElement(AsciiValueEncoder enc) throws IOException { if (mOut == null) { return; } int free = mOutputBufLen - mOutputPtr; if (enc.bufferNeedsFlush(free)) { flush(); } while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBufLen); // If no flushing needed, indicates that all data was encoded if (enc.isCompleted()) { break; } flush(); } }
@Override public final void writeTypedElement(AsciiValueEncoder enc) throws IOException { if (mOut == null) { return; } int free = mOutputBufLen - mOutputPtr; if (enc.bufferNeedsFlush(free)) { flush(); } while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBufLen); // If no flushing needed, indicates that all data was encoded if (enc.isCompleted()) { break; } flush(); } }
@Override public void close(boolean forceRealClose) throws IOException { flush(); mTextWriter = null; mAttrValueWriter = null; // Buffers to free? char[] buf = mOutputBuffer; if (buf != null) { mOutputBuffer = null; mConfig.freeFullCBuffer(buf); } // Plus may need to close the actual writer if (forceRealClose || mAutoCloseOutput) { /* 14-Nov-2008, TSa: To resolve [WSTX-163], need to have a way * to force UTF8Writer to close the underlying stream... */ if (mOut instanceof CompletelyCloseable) { ((CompletelyCloseable)mOut).closeCompletely(); } else { mOut.close(); } } }
@Override public void close(boolean forceRealClose) throws IOException { flush(); mTextWriter = null; mAttrValueWriter = null; // Buffers to free? char[] buf = mOutputBuffer; if (buf != null) { mOutputBuffer = null; mConfig.freeFullCBuffer(buf); } // Plus may need to close the actual writer if (forceRealClose || mAutoCloseOutput) { /* 14-Nov-2008, TSa: To resolve [WSTX-163], need to have a way * to force UTF8Writer to close the underlying stream... */ if (mOut instanceof CompletelyCloseable) { ((CompletelyCloseable)mOut).closeCompletely(); } else { mOut.close(); } } }
@Override public void close(boolean forceRealClose) throws IOException { flush(); mTextWriter = null; mAttrValueWriter = null; // Buffers to free? char[] buf = mOutputBuffer; if (buf != null) { mOutputBuffer = null; mConfig.freeFullCBuffer(buf); } // Plus may need to close the actual writer if (forceRealClose || mAutoCloseOutput) { /* 14-Nov-2008, TSa: To resolve [WSTX-163], need to have a way * to force UTF8Writer to close the underlying stream... */ if (mOut instanceof CompletelyCloseable) { ((CompletelyCloseable)mOut).closeCompletely(); } else { mOut.close(); } } }
public void close(boolean forceRealClose) throws IOException { flush(); mTextWriter = null; mAttrValueWriter = null; // Buffers to free? char[] buf = mOutputBuffer; if (buf != null) { mOutputBuffer = null; mConfig.freeFullCBuffer(buf); } // Plus may need to close the actual writer if (forceRealClose || mAutoCloseOutput) { /* 14-Nov-2008, TSa: To resolve [WSTX-163], need to have a way * to force UTF8Writer to close the underlying stream... */ if (mOut instanceof CompletelyCloseable) { ((CompletelyCloseable)mOut).closeCompletely(); } else { mOut.close(); } } }
@Override public final void writeTypedElement(AsciiValueEncoder enc, XMLValidator validator, char[] copyBuffer) throws IOException, XMLStreamException { if (mOut == null) { return; } int free = mOutputBufLen - mOutputPtr; if (enc.bufferNeedsFlush(free)) { flush(); } int start = mOutputPtr; while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBufLen); // False -> can't be sure it's the whole remaining text validator.validateText(mOutputBuffer, start, mOutputPtr, false); if (enc.isCompleted()) { break; } flush(); start = mOutputPtr; } }
@Override public final void writeTypedElement(AsciiValueEncoder enc, XMLValidator validator, char[] copyBuffer) throws IOException, XMLStreamException { if (mOut == null) { return; } int free = mOutputBufLen - mOutputPtr; if (enc.bufferNeedsFlush(free)) { flush(); } int start = mOutputPtr; while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBufLen); // False -> can't be sure it's the whole remaining text validator.validateText(mOutputBuffer, start, mOutputPtr, false); if (enc.isCompleted()) { break; } flush(); start = mOutputPtr; } }
public final void writeTypedElement(AsciiValueEncoder enc, XMLValidator validator, char[] copyBuffer) throws IOException, XMLStreamException { if (mOut == null) { return; } int free = mOutputBufLen - mOutputPtr; if (enc.bufferNeedsFlush(free)) { flush(); } int start = mOutputPtr; while (true) { mOutputPtr = enc.encodeMore(mOutputBuffer, mOutputPtr, mOutputBufLen); // False -> can't be sure it's the whole remaining text validator.validateText(mOutputBuffer, start, mOutputPtr, false); if (enc.isCompleted()) { break; } flush(); start = mOutputPtr; } }