public static MimeTypes create(Document document) throws MimeTypeException {
        MimeTypes mimeTypes = new MimeTypes();
        new MimeTypesReader(mimeTypes).read(document);
        mimeTypes.init();
        return mimeTypes;
    }
Creates and returns a MimeTypes instance from the specified document.

@throws MimeTypeException if the type configuration is invalid
tika-core/src/main/java/org/apache/tika/mime/MimeTypesFactory.java