private boolean processTag() throws IOException {
        stream.mark(3);
        if (read() == TAG_START) {
            int read = stream.read();
            if (read == SLASH) {
                read = stream.read();
            }
            if ((LOWER_A <= read && read <= LOWER_Z) || (UPPER_A <= read && read <= UPPER_Z)) {
                do {
                    stream.mark(1);
                } while (!contains(SPACE_OR_TAG_END, read()));
                stream.reset();
                while (getAttribute() != null) {/* ignore the attribute*/}
                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