private boolean processMeta() throws IOException {
        stream.mark(6); // len("<meta ") == 6
        if (readCaseInsensitive(META_TAG_START) && contains(SPACE_OR_SLASH, read())) {
            MetaProcessor metaProcessor = new MetaProcessor();
            for (Map.Entry<String, String> attribute = getAttribute(); attribute != null;
                    attribute = getAttribute()) {
                metaProcessor.processAttribute(attribute);
            }
            metaProcessor.updateDetectedCharset(detectedCharset);
            return true;
        }
        stream.reset();
        return false;
    }
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