Charset scan() {
        while (processAtLeastOneByte()) {
            if (detectedCharset.isFound()) {
                return detectedCharset.getCharset();
            }
        }
        return null;
    }
A scanner meant to detect charset meta tags in a byte stream
See: https://html.spec.whatwg.org/multipage/parsing.html#prescan-a-byte-stream-to-determine-its-encoding
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-html-module/src/main/java/org/apache/tika/parser/html/charsetdetector/PreScanner.java