public MimeTypes getMimeTypes() {
        MimeTypes localMimeTypes = context.get(MimeTypes.class);
        //be as lazy as possible and cache the mimeTypes
        if (localMimeTypes != null) {
            return localMimeTypes;
        }
        if (mimeTypes != null) {
            return mimeTypes;
        }
        mimeTypes = getTikaConfig().getMimeRepository();
        return mimeTypes;
    }
Utility function to get the Parser that was sent in to the
ParseContext to handle embedded documents.  If it is stateful,
unwrap it to get its stateless delegating parser.
<p>
If there is no Parser in the parser context, this will return null.

@param context
@return
tika-core/src/main/java/org/apache/tika/extractor/EmbeddedDocumentUtil.java