jMimeMagic is a Java library for determining the MIME type of files or streams.