mime-util-1.3 Released

mime-util is a small, fast, lightweight mime detection utility for java. It can be used standalone or within an application server as part of a JEE application. It is able to detect mime types from java File objects, InputStream's, URLConnection's, byte arrays and strings representing file names. Each of the MimeUtil.getMimeTypes(...) methods returns a Collection of one or more matching mime types.

This is the last release in the 1.x branch and has significant re-factoring to most of the classes as well as a host of new support classes. Please read the release notes and java doc for this release for more details.

The utility has a new plug-able architecture for MimeDetector(s) and the existing code has been partitioned to create two default MimeDetector(s), ExtensionMimeDetector and MagicMimeMimeDetector.

The old eu.medsea.util.MimeUtil class has been deprecated in favor of a more robust version in eu.medsea.mimeutil.MimeUtil. This version has many new utility methods and some optimisations to previous methods. The original MimeUtil class is still available for backwards compatibility but the methods will most likely return different results to the previous version due to changes in the core utility. It is highly advisable that you refactor your application to be compatible with this new version.

This version also has a new MimeDetector called OpendesktopMimeDetector that integrates with the Free desktop shared MIME database. The implementation utilises the /usr/share/mime/mime.cache memory mapped file as a java memory mapped file thus it will withstand modifications to the database without requiring a restart.

Posted by Steven McArdle 2009-03-04