@Override
    public void characters(char[] ch, int start, int length) throws SAXException {
        if (writeLimitReached) {
            return;
        }
        if (writeLimit == -1 || writeCount + length <= writeLimit) {
            super.characters(ch, start, length);
            writeCount += length;
        } else {
            super.characters(ch, start, writeLimit - writeCount);
            handleWriteLimitReached();
        }
    }
Writes the given characters to the given character stream.
tika-core/src/main/java/org/apache/tika/sax/WriteOutContentHandler.java