Called to indicate the end of a run of characters. When this class is
used for checking source text, this method should be called after all
the calls to <code>characters()</code>.

@throws SAXException if the <code>ErrorHandler</code> throws.
357829
@SuppressWarnings("deprecation")
    public void flush() throws SAXException {
        if (!alreadyComplainedAboutThisRun
                && !Normalizer.isNormalized(buf, 0, pos, Normalizer.NFC, 0)) {
            errAboutTextRun();
        }
        reset();
    }
246457
public void characters(org.w3c.dom.Node node)
        throws org.xml.sax.SAXException
    {
        flushPending();
        String data = node.getNodeValue();
        if (data != null)
        {
            final int length = data.length();
            if (length > m_charsBuff.length)
            {
                m_charsBuff = new char[length * 2 + 1];
            }
            data.getChars(0, length, m_charsBuff, 0);
            characters(m_charsBuff, 0, length);
        }
    }
1121216
@Override
    public void fatalError(SAXParseException exception) throws SAXException {
        if (reportErrors) print("fatal", exception);
        if (abortOnErrors) throw exception;
    }
648387
public void endElement(String uri, String localName, String qName)
	    throws SAXException {
	// reduce the depth
	depth--;

	if (isExcluded()) {
	    // determine if exclusion ends with us
	    if (excludedDepth == depth)
	        excludedDepth = -1;

	    // either way, we have been excluded, so pass nothing through
	    return;
	}

	// if we're excepted (for now), include ourselves...
	if (isAccepted())
	    getContentHandler().endElement(uri, localName, qName);

	    if (DEBUG) {
		System.err.println("***   Closing tag: " + localName);
		System.err.println("***   acceptedDepths.size(): " + acceptedDepths.size());
		System.err.println("***   last accepted depth: " + ((Integer)acceptedDepths.peek()).intValue());
		System.err.println("***   depth: " + depth);
	    }

	// now, back off if we correspond to a "successful" start tag
        if (acceptedDepths.size() > 0 &&
		(((Integer)acceptedDepths.peek()).intValue()) == depth)
	    acceptedDepths.pop();
    }
644644
@Override
	public void characters(char[] text, int start, int length) throws SAXException
	{
		if (length > 0)
		{
			String data = String.valueOf(text, start, length).replace('\n', ' ').replace('\t', ' ').trim();
			if (data.length() > 0)
			{
				Command.prn(tabCount, tabCount + ">setting data=" + data //$NON-NLS-1$
						+ "<EOL>"); //$NON-NLS-1$
				Command cmd = stack.peek();
				cmd.setData(data);
			}
		}
	}
575399
public void comment(char[] ch, int start, int length) throws SAXException
    {
        if (m_firstTagNotEmitted)
        {
            flush();
        }

        m_handler.comment(ch, start, length);
    }
218088
@Override
    public void error(SAXParseException exception) throws SAXException {
        if (reportErrors) print("error", exception);
        if (abortOnErrors) throw exception;
    }
598588
public void warning(SAXParseException e) throws SAXException
  {
    // This is not great, but we really would rather have the error 
    // handler be the error listener if it is a error handler.  Coroutine's fatalError 
    // can't really be configured, so I think this is the best thing right now 
    // for error reporting.  Possibly another JAXP 1.1 hole.  -sb
    javax.xml.transform.ErrorListener errorListener = m_transformer.getErrorListener();
    if(errorListener instanceof ErrorHandler)
    {
      ((ErrorHandler)errorListener).warning(e);
    }
    else
    {
      try
      {
        errorListener.warning(new javax.xml.transform.TransformerException(e));
      }
      catch(javax.xml.transform.TransformerException te)
      {
        throw e;
      }
    }
  }
928628
public void characters(char[] ch, int start, int length)
	    throws SAXException {
	if (isAccepted())
	    getContentHandler().characters(ch, start, length);
    }
595905
public void error(SAXParseException e) throws SAXException
  {
    // %REVIEW% I don't think this should be called.  -sb
    // clearCoRoutine(e);

    // This is not great, but we really would rather have the error 
    // handler be the error listener if it is a error handler.  Coroutine's fatalError 
    // can't really be configured, so I think this is the best thing right now 
    // for error reporting.  Possibly another JAXP 1.1 hole.  -sb
    javax.xml.transform.ErrorListener errorListener = m_transformer.getErrorListener();
    if(errorListener instanceof ErrorHandler)
    {
      ((ErrorHandler)errorListener).error(e);
      if(null != m_errorHandler)
        m_errorHandler.error(e); // may not be called.
    }
    else
    {
      try
      {
        errorListener.error(new javax.xml.transform.TransformerException(e));
        if(null != m_errorHandler)
          m_errorHandler.error(e); // may not be called.
      }
      catch(javax.xml.transform.TransformerException te)
      {
        throw e;
      }
    }
  }
1105349
public void writeEndElement() throws SAXException {
        processStartElement();
        final QName qName = elementStack.remove(); // pop
        transformer.endElement(qName.uri, qName.localName, qName.qName);
        for (final NamespaceMapping p: qName.mappings) {
            if (p.newMapping) {
                transformer.endPrefixMapping(p.prefix);
            }
        }
    }
1098215
private void outputString(String s) throws SAXException {
        handler.characters(s.toCharArray(), 0, s.length());
    }
708682
private final void dispatachChars(Node node)
     throws org.xml.sax.SAXException
  {
    if(m_contentHandler instanceof org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.CharacterNodeHandler)
    {
      ((org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.CharacterNodeHandler)m_contentHandler).characters(node);
    }
    else
    {
      String data = ((Text) node).getData();
      this.m_contentHandler.characters(data.toCharArray(), 0, data.length());
    }
  }
1232586
public void writeCharacters(final String text) throws SAXException {
        if (elementStack.isEmpty()) {
            throw new IllegalStateException("Current state does not allow Character writing");
        }
        final char[] ch = text.toCharArray();
        writeCharacters(ch, 0, ch.length);
    }
993725
public void writeCharacters(final char[] ch, final int start, final int length) throws SAXException {
        if (elementStack.isEmpty()) {
            throw new IllegalStateException("Current state does not allow Character writing");
        }
        processStartElement();
        transformer.characters(ch, start, length);
    }
925103
public void warning(SAXParseException exception) throws SAXException {
        if (logger.isLoggable(Level.WARNING))
            logger.warning("Warning on line " + exception.getLineNumber() +
                           ": " + exception.getMessage());
    }
1189875
public void endElement(String name) throws org.xml.sax.SAXException
    {
        endElement(null, null, name);
    }