Java Code Examples for com.sun.org.apache.xml.internal.serializer.SerializationHandler#characters()
The following examples show how to use
com.sun.org.apache.xml.internal.serializer.SerializationHandler#characters() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: jdk1.8-source-analysis File: SimpleResultTreeImpl.java License: Apache License 2.0 | 5 votes |
/** * Dispatch the character content of a node to an output handler. * * The escape setting should be taken care of when outputting to * a handler. */ public void characters(final int node, SerializationHandler handler) throws TransletException { int nodeID = getNodeIdent(node); if (nodeID == RTF_ROOT || nodeID == RTF_TEXT) { boolean escapeBit = false; boolean oldEscapeSetting = false; try { for (int i = 0; i < _size; i++) { if (_dontEscape != null) { escapeBit = _dontEscape.getBit(i); if (escapeBit) { oldEscapeSetting = handler.setEscaping(false); } } handler.characters(_textArray[i]); if (escapeBit) { handler.setEscaping(oldEscapeSetting); } } } catch (SAXException e) { throw new TransletException(e); } } }
Example 2
Source Project: jdk1.8-source-analysis File: AbstractTranslet.java License: Apache License 2.0 | 5 votes |
/** * Used by some compiled code as a shortcut for passing strings to the * output handler */ public final void characters(final String string, SerializationHandler handler) throws TransletException { if (string != null) { //final int length = string.length(); try { handler.characters(string); } catch (Exception e) { throw new TransletException(e); } } }
Example 3
Source Project: jdk1.8-source-analysis File: BasisLibrary.java License: Apache License 2.0 | 5 votes |
public static void copy(Object obj, SerializationHandler handler, int node, DOM dom) { try { if (obj instanceof DTMAxisIterator) { DTMAxisIterator iter = (DTMAxisIterator) obj; dom.copy(iter.reset(), handler); } else if (obj instanceof Node) { dom.copy(((Node) obj).node, handler); } else if (obj instanceof DOM) { //((DOM)obj).copy(((com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase)((DOMAdapter)obj).getDOMImpl()).getDocument(), handler); DOM newDom = (DOM)obj; newDom.copy(newDom.getDocument(), handler); } else { String string = obj.toString(); // or call stringF() final int length = string.length(); if (length > _characterArray.length) _characterArray = new char[length]; string.getChars(0, length, _characterArray, 0); handler.characters(_characterArray, 0, length); } } catch (SAXException e) { runTimeError(RUN_TIME_COPY_ERR); } }
Example 4
Source Project: hottub File: SimpleResultTreeImpl.java License: GNU General Public License v2.0 | 5 votes |
/** * Dispatch the character content of a node to an output handler. * * The escape setting should be taken care of when outputting to * a handler. */ public void characters(final int node, SerializationHandler handler) throws TransletException { int nodeID = getNodeIdent(node); if (nodeID == RTF_ROOT || nodeID == RTF_TEXT) { boolean escapeBit = false; boolean oldEscapeSetting = false; try { for (int i = 0; i < _size; i++) { if (_dontEscape != null) { escapeBit = _dontEscape.getBit(i); if (escapeBit) { oldEscapeSetting = handler.setEscaping(false); } } handler.characters(_textArray[i]); if (escapeBit) { handler.setEscaping(oldEscapeSetting); } } } catch (SAXException e) { throw new TransletException(e); } } }
Example 5
Source Project: hottub File: BasisLibrary.java License: GNU General Public License v2.0 | 5 votes |
public static void copy(Object obj, SerializationHandler handler, int node, DOM dom) { try { if (obj instanceof DTMAxisIterator) { DTMAxisIterator iter = (DTMAxisIterator) obj; dom.copy(iter.reset(), handler); } else if (obj instanceof Node) { dom.copy(((Node) obj).node, handler); } else if (obj instanceof DOM) { //((DOM)obj).copy(((com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase)((DOMAdapter)obj).getDOMImpl()).getDocument(), handler); DOM newDom = (DOM)obj; newDom.copy(newDom.getDocument(), handler); } else { String string = obj.toString(); // or call stringF() final int length = string.length(); if (length > _characterArray.length) _characterArray = new char[length]; string.getChars(0, length, _characterArray, 0); handler.characters(_characterArray, 0, length); } } catch (SAXException e) { runTimeError(RUN_TIME_COPY_ERR); } }
Example 6
Source Project: openjdk-jdk9 File: BasisLibrary.java License: GNU General Public License v2.0 | 5 votes |
public static void copy(Object obj, SerializationHandler handler, int node, DOM dom) { try { if (obj instanceof DTMAxisIterator) { DTMAxisIterator iter = (DTMAxisIterator) obj; dom.copy(iter.reset(), handler); } else if (obj instanceof Node) { dom.copy(((Node) obj).node, handler); } else if (obj instanceof DOM) { //((DOM)obj).copy(((com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase)((DOMAdapter)obj).getDOMImpl()).getDocument(), handler); DOM newDom = (DOM)obj; newDom.copy(newDom.getDocument(), handler); } else { String string = obj.toString(); // or call stringF() final int length = string.length(); if (length > _characterArray.length) _characterArray = new char[length]; string.getChars(0, length, _characterArray, 0); handler.characters(_characterArray, 0, length); } } catch (SAXException e) { runTimeError(RUN_TIME_COPY_ERR); } }
Example 7
Source Project: jdk8u60 File: SimpleResultTreeImpl.java License: GNU General Public License v2.0 | 5 votes |
/** * Dispatch the character content of a node to an output handler. * * The escape setting should be taken care of when outputting to * a handler. */ public void characters(final int node, SerializationHandler handler) throws TransletException { int nodeID = getNodeIdent(node); if (nodeID == RTF_ROOT || nodeID == RTF_TEXT) { boolean escapeBit = false; boolean oldEscapeSetting = false; try { for (int i = 0; i < _size; i++) { if (_dontEscape != null) { escapeBit = _dontEscape.getBit(i); if (escapeBit) { oldEscapeSetting = handler.setEscaping(false); } } handler.characters(_textArray[i]); if (escapeBit) { handler.setEscaping(oldEscapeSetting); } } } catch (SAXException e) { throw new TransletException(e); } } }
Example 8
Source Project: openjdk-8 File: BasisLibrary.java License: GNU General Public License v2.0 | 5 votes |
public static void copy(Object obj, SerializationHandler handler, int node, DOM dom) { try { if (obj instanceof DTMAxisIterator) { DTMAxisIterator iter = (DTMAxisIterator) obj; dom.copy(iter.reset(), handler); } else if (obj instanceof Node) { dom.copy(((Node) obj).node, handler); } else if (obj instanceof DOM) { //((DOM)obj).copy(((com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase)((DOMAdapter)obj).getDOMImpl()).getDocument(), handler); DOM newDom = (DOM)obj; newDom.copy(newDom.getDocument(), handler); } else { String string = obj.toString(); // or call stringF() final int length = string.length(); if (length > _characterArray.length) _characterArray = new char[length]; string.getChars(0, length, _characterArray, 0); handler.characters(_characterArray, 0, length); } } catch (SAXException e) { runTimeError(RUN_TIME_COPY_ERR); } }
Example 9
Source Project: Bytecoder File: BasisLibrary.java License: Apache License 2.0 | 5 votes |
public static void copy(Object obj, SerializationHandler handler, int node, DOM dom) { try { if (obj instanceof DTMAxisIterator) { DTMAxisIterator iter = (DTMAxisIterator) obj; dom.copy(iter.reset(), handler); } else if (obj instanceof Node) { dom.copy(((Node) obj).node, handler); } else if (obj instanceof DOM) { //((DOM)obj).copy(((com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase)((DOMAdapter)obj).getDOMImpl()).getDocument(), handler); DOM newDom = (DOM)obj; newDom.copy(newDom.getDocument(), handler); } else { String string = obj.toString(); // or call stringF() final int length = string.length(); if (length > _characterArray.length) _characterArray = new char[length]; string.getChars(0, length, _characterArray, 0); handler.characters(_characterArray, 0, length); } } catch (SAXException e) { runTimeError(RUN_TIME_COPY_ERR); } }
Example 10
Source Project: openjdk-8-source File: BasisLibrary.java License: GNU General Public License v2.0 | 5 votes |
public static void copy(Object obj, SerializationHandler handler, int node, DOM dom) { try { if (obj instanceof DTMAxisIterator) { DTMAxisIterator iter = (DTMAxisIterator) obj; dom.copy(iter.reset(), handler); } else if (obj instanceof Node) { dom.copy(((Node) obj).node, handler); } else if (obj instanceof DOM) { //((DOM)obj).copy(((com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase)((DOMAdapter)obj).getDOMImpl()).getDocument(), handler); DOM newDom = (DOM)obj; newDom.copy(newDom.getDocument(), handler); } else { String string = obj.toString(); // or call stringF() final int length = string.length(); if (length > _characterArray.length) _characterArray = new char[length]; string.getChars(0, length, _characterArray, 0); handler.characters(_characterArray, 0, length); } } catch (SAXException e) { runTimeError(RUN_TIME_COPY_ERR); } }
Example 11
Source Project: JDKSourceCode1.8 File: AbstractTranslet.java License: MIT License | 5 votes |
/** * Used by some compiled code as a shortcut for passing strings to the * output handler */ public final void characters(final String string, SerializationHandler handler) throws TransletException { if (string != null) { //final int length = string.length(); try { handler.characters(string); } catch (Exception e) { throw new TransletException(e); } } }
Example 12
Source Project: JDKSourceCode1.8 File: BasisLibrary.java License: MIT License | 5 votes |
public static void copy(Object obj, SerializationHandler handler, int node, DOM dom) { try { if (obj instanceof DTMAxisIterator) { DTMAxisIterator iter = (DTMAxisIterator) obj; dom.copy(iter.reset(), handler); } else if (obj instanceof Node) { dom.copy(((Node) obj).node, handler); } else if (obj instanceof DOM) { //((DOM)obj).copy(((com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase)((DOMAdapter)obj).getDOMImpl()).getDocument(), handler); DOM newDom = (DOM)obj; newDom.copy(newDom.getDocument(), handler); } else { String string = obj.toString(); // or call stringF() final int length = string.length(); if (length > _characterArray.length) _characterArray = new char[length]; string.getChars(0, length, _characterArray, 0); handler.characters(_characterArray, 0, length); } } catch (SAXException e) { runTimeError(RUN_TIME_COPY_ERR); } }
Example 13
Source Project: openjdk-jdk8u File: SimpleResultTreeImpl.java License: GNU General Public License v2.0 | 5 votes |
/** * Dispatch the character content of a node to an output handler. * * The escape setting should be taken care of when outputting to * a handler. */ public void characters(final int node, SerializationHandler handler) throws TransletException { int nodeID = getNodeIdent(node); if (nodeID == RTF_ROOT || nodeID == RTF_TEXT) { boolean escapeBit = false; boolean oldEscapeSetting = false; try { for (int i = 0; i < _size; i++) { if (_dontEscape != null) { escapeBit = _dontEscape.getBit(i); if (escapeBit) { oldEscapeSetting = handler.setEscaping(false); } } handler.characters(_textArray[i]); if (escapeBit) { handler.setEscaping(oldEscapeSetting); } } } catch (SAXException e) { throw new TransletException(e); } } }
Example 14
Source Project: openjdk-jdk8u File: AbstractTranslet.java License: GNU General Public License v2.0 | 5 votes |
/** * Used by some compiled code as a shortcut for passing strings to the * output handler */ public final void characters(final String string, SerializationHandler handler) throws TransletException { if (string != null) { //final int length = string.length(); try { handler.characters(string); } catch (Exception e) { throw new TransletException(e); } } }
Example 15
Source Project: openjdk-jdk8u File: BasisLibrary.java License: GNU General Public License v2.0 | 5 votes |
public static void copy(Object obj, SerializationHandler handler, int node, DOM dom) { try { if (obj instanceof DTMAxisIterator) { DTMAxisIterator iter = (DTMAxisIterator) obj; dom.copy(iter.reset(), handler); } else if (obj instanceof Node) { dom.copy(((Node) obj).node, handler); } else if (obj instanceof DOM) { //((DOM)obj).copy(((com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase)((DOMAdapter)obj).getDOMImpl()).getDocument(), handler); DOM newDom = (DOM)obj; newDom.copy(newDom.getDocument(), handler); } else { String string = obj.toString(); // or call stringF() final int length = string.length(); if (length > _characterArray.length) _characterArray = new char[length]; string.getChars(0, length, _characterArray, 0); handler.characters(_characterArray, 0, length); } } catch (SAXException e) { runTimeError(RUN_TIME_COPY_ERR); } }
Example 16
Source Project: openjdk-jdk9 File: AbstractTranslet.java License: GNU General Public License v2.0 | 5 votes |
/** * Used by some compiled code as a shortcut for passing strings to the * output handler */ public final void characters(final String string, SerializationHandler handler) throws TransletException { if (string != null) { //final int length = string.length(); try { handler.characters(string); } catch (Exception e) { throw new TransletException(e); } } }
Example 17
Source Project: openjdk-jdk8u-backup File: AbstractTranslet.java License: GNU General Public License v2.0 | 5 votes |
/** * Used by some compiled code as a shortcut for passing strings to the * output handler */ public final void characters(final String string, SerializationHandler handler) throws TransletException { if (string != null) { //final int length = string.length(); try { handler.characters(string); } catch (Exception e) { throw new TransletException(e); } } }
Example 18
Source Project: openjdk-jdk8u-backup File: BasisLibrary.java License: GNU General Public License v2.0 | 5 votes |
public static void copy(Object obj, SerializationHandler handler, int node, DOM dom) { try { if (obj instanceof DTMAxisIterator) { DTMAxisIterator iter = (DTMAxisIterator) obj; dom.copy(iter.reset(), handler); } else if (obj instanceof Node) { dom.copy(((Node) obj).node, handler); } else if (obj instanceof DOM) { //((DOM)obj).copy(((com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase)((DOMAdapter)obj).getDOMImpl()).getDocument(), handler); DOM newDom = (DOM)obj; newDom.copy(newDom.getDocument(), handler); } else { String string = obj.toString(); // or call stringF() final int length = string.length(); if (length > _characterArray.length) _characterArray = new char[length]; string.getChars(0, length, _characterArray, 0); handler.characters(_characterArray, 0, length); } } catch (SAXException e) { runTimeError(RUN_TIME_COPY_ERR); } }
Example 19
Source Project: openjdk-8-source File: SimpleResultTreeImpl.java License: GNU General Public License v2.0 | 5 votes |
/** * Dispatch the character content of a node to an output handler. * * The escape setting should be taken care of when outputting to * a handler. */ public void characters(final int node, SerializationHandler handler) throws TransletException { int nodeID = getNodeIdent(node); if (nodeID == RTF_ROOT || nodeID == RTF_TEXT) { boolean escapeBit = false; boolean oldEscapeSetting = false; try { for (int i = 0; i < _size; i++) { if (_dontEscape != null) { escapeBit = _dontEscape.getBit(i); if (escapeBit) { oldEscapeSetting = handler.setEscaping(false); } } handler.characters(_textArray[i]); if (escapeBit) { handler.setEscaping(oldEscapeSetting); } } } catch (SAXException e) { throw new TransletException(e); } } }
Example 20
Source Project: hottub File: AbstractTranslet.java License: GNU General Public License v2.0 | 5 votes |
/** * Used by some compiled code as a shortcut for passing strings to the * output handler */ public final void characters(final String string, SerializationHandler handler) throws TransletException { if (string != null) { //final int length = string.length(); try { handler.characters(string); } catch (Exception e) { throw new TransletException(e); } } }