Release 2.1 of mime-util adds a new WindowsRegistryMimeDetector that hooks into the windows registry to lookup the “Content Type” of fle extension.
We have also added a new MimeUtil2 class that can be used in multi-threaded environments where each instance can have it's own list of registered MimeDetector(s) allow you to have different detection policies in different parts of your application.
This release also adds the ability for the getMimeTypes(URL url) method to get the MIME type directly from entries within Zip and Jar files. An example using this method to look up the MIME types of an entry from within a Jar file is:
MimeUtil2 mimeUtil = new MimeUtil2();
Collection mimeTypes = mimeUtil.getMimeTypes(new URL("jar:file:/examples/resources/test.zip!/testimage.jpg"));
A new utility ZipJarUtil class has been added that has several useful overloaded methods to retrieve the list of entries from within a Zip or Jar file.
We have also raised a JIRA issue to have this and future releases of mime-util automatically synced with the Maven Central repository.
For a detailed description of the detection policies supported by mime-util and some examples of how to configure and use it, please visit the mime-util web site at http://www.medsea.eu/mime-util