rabbit.util
Class MimeTypeMapper
java.lang.Object
rabbit.util.MimeTypeMapper
public class MimeTypeMapper
- extends Object
A class that tries to guess mime types based on file extensions.
- Author:
- Robert Olofsson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MimeTypeMapper
public MimeTypeMapper()
getMimeType
public static String getMimeType(String filename)
- Try to guess the mime type based on the given filename.
- Parameters:
filename
- the name of the file to guess the mime type for
- Returns:
- a mime type