private void handleViewName(int typeA, int typeB, InputStream stream, XHTMLContentHandler xhtml,
                                Last5 l5) throws IOException, SAXException, TikaException {
        // Is it 8 byte zero padded?
        int maybeLength = EndianUtils.readUShortLE(stream);
        if (maybeLength == 0) {
            // Check the next 6 bytes too
            for (int i = 0; i < 6; i++) {
                int read = stream.read();
                if (read >= 0 && read <= 0x0f) {
                    // Promising
                } else {
                    // Wrong, false detection
                    return;
                }
            }

            byte[] b2 = new byte[2];
            IOUtils.readFully(stream, b2);
            int length = EndianUtils.getUShortLE(b2);
            if (length > 1 && length <= MAX_TEXT_LENGTH) {
                // Length check passed
                handleText(length, stream, xhtml);
            } else {
                // Was probably something else
                l5.record(b2[0]);
                l5.record(b2[1]);
            }
        } else if (maybeLength > 0 && maybeLength < MAX_TEXT_LENGTH) {
            // Looks like it's straight into the text
            handleText(maybeLength, stream, xhtml);
        }
    }
How long do we allow a text run to claim to be, before we
decide we're confused and it's not really text after all?
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-cad-module/src/main/java/org/apache/tika/parser/prt/PRTParser.java