@Override
    public void write(char[] cbuf, int off, int len) {
        detector.addText(cbuf, off, len);
    }
Returns the detected language based on text written thus far.

@return LanguageResult
tika-core/src/main/java/org/apache/tika/language/detect/LanguageWriter.java