@Override
        public void endDocument() {
            String[] names = metadata.names();
            Arrays.sort(names);
            outputMetadata(names);
            writer.flush();
            this.metOutput = true;
        }
Compares our mime types registry with the File(1) tool's
directory of (uncompiled) Magic entries.
(Well, those with mimetypes anyway)

@param magicDir Path to the magic directory
tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java