public class ContentTypeResolver extends Object
| Constructor and Description |
|---|
ContentTypeResolver() |
| Modifier and Type | Method and Description |
|---|---|
static String |
get(String fileName)
Returns a valid HTTP contentType's for a given filename.
|
static String |
get(String fileName,
String encoding)
Returns a valid HTTP contentType's for a given filename with charset.
|
public static String get(String fileName)
javax.activation.FileTypeMap class (available in jdk6) in
order to be compatible with jdk5. If this class is not available, the default content type is returned.fileName - with an filename extensionpublic static String get(String fileName, String encoding)
fileName - with an filename extensionencoding - which encoding to useCopyright © 2008-2016. All Rights Reserved.