static boolean shouldDecode(String s) {
        if (s == null || s.length() < 8) {
            return false;
        }
        for (String BOM : PDF_ENCODING_BOMS) {
            if (s.startsWith(BOM)) {
                return true;
            }
        }
        return false;
    }
Does this string contain an octal-encoded UTF BOM?
Call this statically to determine if you should bother creating a new parser to parse it.

@param s
@return
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-pdf-module/src/main/java/org/apache/tika/parser/pdf/PDFEncodedStringDecoder.java