On Wed, 23 Apr 2014, אברהם חיון wrote:
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 ?

Check the supertype, and then recurse checking supertypes of that, until you either hit the type of interest, or hit octet stream

Look at the displaySupportedTypes() method of TikaCLI for an example of getting the supertype, then recurse on that if you want to keep checking up the tree

Nick

Reply via email to