private static boolean readCheckTagAndCheck(Element checkDef) {
        String command = null;
        List<Integer> errorVals = new ArrayList<>();

        NodeList children = checkDef.getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
            Node node = children.item(i);
            if (node.getNodeType() == Node.ELEMENT_NODE) {
                Element child = (Element) node;
                if (child.getTagName().equals(COMMAND_TAG)) {
                    command = getString(child);
                }
                if (child.getTagName().equals(ERROR_CODES_TAG)) {
                    String errs = getString(child);
                    StringTokenizer st = new StringTokenizer(errs, ",");
                    while (st.hasMoreElements()) {
                        try {
                            String s = st.nextToken();
                            errorVals.add(Integer.parseInt(s));
                        } catch (NumberFormatException e) {
                            //swallow
                        }
                    }
                }
            }
        }

        if (command != null) {
            String[] theCommand = command.split(" ");
            int[] errVals = new int[errorVals.size()];
            for (int i = 0; i < errVals.length; i++) {
                errVals[i] = errorVals.get(i);
            }

            return ExternalParser.check(theCommand, errVals);
        }

        // No check command, so assume it's there
        return true;
    }
Builds and Returns an ExternalParser, or null if a check
command was given that didn't match.
tika-core/src/main/java/org/apache/tika/parser/external/ExternalParsersConfigReader.java