Easily guessing mime types from filenames and streams in Java.