public class MIMEMapping extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
MIMEMapping.MIMEMappingItem
Used to keep the configuration in memory.
|
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CHAR_ENCODING |
static String |
DEFAULT_EXTENSION |
static String |
DEFAULT_ICON |
static String |
DEFAULT_ICON_STYLE |
static String |
ICONS_PATH |
Modifier and Type | Method and Description |
---|---|
static String |
getContentEncoding(String contentType) |
static String |
getContentEncodingOrDefault(String contentType) |
static String |
getMIMEType(String key)
Get MIME type String.
|
static String |
getMIMETypeIcon(String extension)
Returns the icon used for rendering this type.
|
static String |
getMIMETypeIconStyle(String mimeType)
Returns the icon css style name.
|
static String |
getMIMETypeOrDefault(String extension)
Returns the mime-type associated with this extension, or the server's default.
|
static void |
init()
Reads all configured mime mapping (config/server/MIMEMapping).
|
static void |
load()
Reads all configured mime mapping (config/server/MIMEMapping).
|
static void |
reload() |
public static final String ICONS_PATH
public static final String DEFAULT_ICON
public static final String DEFAULT_ICON_STYLE
public static final String DEFAULT_CHAR_ENCODING
public static final String DEFAULT_EXTENSION
public static void init()
public static void load()
public static void reload()
public static String getMIMEType(String key)
key
- extension for which MIME type is requestedpublic static String getMIMETypeOrDefault(String extension)
public static String getMIMETypeIcon(String extension)
Copyright © 2003–2015 Magnolia International Ltd.. All rights reserved.