mime-util (Mime Detection Utility)
mime-util is a free, light weight, Open Source Mime Detection utility for Java.
Mime Detection has come a long way from it's beginnings as used for email content. The mime-util library is able to detect MIME Types from Files, InputStreams, URLs and byte arrays using plugable MimeDetectors utilising various extensible and customisable detection policies such as extension mapping, glob file name matching, magic data matching and other content sniffing techniques