Correct use of Apache Tika MediaType
问题 I want to use APache Tika's MediaType class to compare mediaTypes. I first use Tika to detect the MediaType. Then I want to start an action according to the MediaType. So if the MediaType is from type XML I want to do some action, if it is a compressed file I want to start an other action. My problem is that there are many XML types, so how do I check if it is an XML using the MediaType ? Here is my previous (before Tika) implementation: if (contentType.contains("text/xml") || contentType