public static MimeTypes create(String coreFilePath, String extensionFilePath,
                                   ClassLoader classLoader) throws IOException, MimeTypeException {
        // If no specific classloader was requested, use our own class's one
        if (classLoader == null) {
            classLoader = MimeTypesReader.class.getClassLoader();
        }

        // This allows us to replicate class.getResource() when using
        //  the classloader directly
        String classPrefix = MimeTypesReader.class.getPackage().getName().replace('.', '/') + "/";

        // Get the core URL, and all the extensions URLs
        URL coreURL = classLoader.getResource(classPrefix + coreFilePath);
        List<URL> extensionURLs =
                Collections.list(classLoader.getResources(extensionFilePath));

        // Swap that into an Array, and process
        List<URL> urls = new ArrayList<>();
        urls.add(coreURL);
        urls.addAll(extensionURLs);
        if (LOG.isDebugEnabled()) {
            urls.stream().forEach( u ->
                    LOG.debug("Loaded custom mimes file: {}", u)
            );
        }

        String customMimesPath = System.getProperty(CUSTOM_MIMES_SYS_PROP);
        if (customMimesPath != null) {
            File externalFile = new File(customMimesPath);
            if (!externalFile.exists()) {
                throw new IOException(
                        "Specified custom mimetypes file not found: " + customMimesPath);
            }
            URL externalURL = externalFile.toURI().toURL();
            urls.add(externalURL);
            if (LOG.isDebugEnabled()) {
                LOG.debug("Loaded external custom mimetypes file: {}", externalFile.getAbsolutePath());
            }
        }

        return create(urls.toArray(new URL[0]));
    }
Creates and returns a MimeTypes instance. The core mimetypes
will be loaded from the specified file path, and any custom
override mimetypes found will loaded afterwards.
The file paths will be interpreted by the specified class
loader in getResource().
It will also load custom mimetypes from the system property
{@link #CUSTOM_MIMES_SYS_PROP}, if specified.

@param coreFilePath      The main MimeTypes file to load
@param extensionFilePath The name of extension MimeType files to load afterwards
@throws IOException       if the file can not be accessed
@throws MimeTypeException if the type configuration is invalid
tika-core/src/main/java/org/apache/tika/mime/MimeTypesFactory.java