private int writeCharsAndEntity(char[] ch, int from, int to, String entity)
            throws SAXException {
        super.characters(ch, from, to - from);
        write('&');
        write(entity);
        write(';');
        return to + 1;
    }
Writes the given characters as-is followed by the given entity.

@param ch     character array
@param from   start position in the array
@param to     end position in the array
@param entity entity code
@return next position in the array,
after the characters plus one entity
@throws SAXException if the characters could not be written
tika-core/src/main/java/org/apache/tika/sax/ToXMLContentHandler.java