コード例 #1
0
 /**
  * This will be called for each chunk of character data encountered.
  *
  * @param elementText all text in an element, including whitespace.
  */
 private void characters(String elementText) throws JDOMException {
   char[] c = elementText.toCharArray();
   try {
     contentHandler.characters(c, 0, c.length);
   } catch (SAXException se) {
     throw new JDOMException("Exception in characters", se);
   }
 }
コード例 #2
0
ファイル: SAXSerializer.java プロジェクト: james-jw/basex
 @Override
 protected void text(final byte[] value, final FTPos ftp) throws IOException {
   try {
     final String s = string(value);
     final char[] c = s.toCharArray();
     contentHandler.characters(c, 0, c.length);
   } catch (final SAXException ex) {
     throw new IOException(ex);
   }
 }