|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.turbine.services.mimetype.TurbineMimeTypes
This is a static accessor to MIME types and charsets.
Constructor Summary | |
TurbineMimeTypes()
|
Method Summary | |
static java.lang.String |
getCharSet(java.util.Locale locale)
Gets the charset for a locale. |
static java.lang.String |
getCharSet(java.util.Locale locale,
java.lang.String variant)
Gets the charset for a locale with a variant. |
static java.lang.String |
getCharSet(java.lang.String key)
Gets the charset for a specified key. |
static java.lang.String |
getCharSet(java.lang.String key,
java.lang.String def)
Gets the charset for a specified key. |
static java.lang.String |
getContentType(java.io.File file)
Gets the MIME content type for a file as a string. |
static java.lang.String |
getContentType(java.lang.String name)
Gets the MIME content type for a named file as a string. |
static java.lang.String |
getContentType(java.lang.String ext,
java.lang.String def)
Gets the MIME content type for a file name extension as a string. |
static java.lang.String |
getDefaultExtension(MimeType mime)
Gets the default file name extension for a MIME type. |
static MimeType |
getMimeContentType(java.io.File file)
Gets the MIME content type for a file. |
static MimeType |
getMimeContentType(java.lang.String name)
Gets the MIME content type for a named file. |
static MimeType |
getMimeContentType(java.lang.String ext,
java.lang.String def)
Gets the MIME content type for a file name extension. |
protected static MimeTypeService |
getService()
Gets the MIME type service implementation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TurbineMimeTypes()
Method Detail |
public static java.lang.String getContentType(java.io.File file)
file
- the file.
public static java.lang.String getContentType(java.lang.String name)
name
- the name of the file.
public static java.lang.String getContentType(java.lang.String ext, java.lang.String def)
ext
- the file name extension.def
- the default type if none is found.
public static MimeType getMimeContentType(java.io.File file)
file
- the file.
public static MimeType getMimeContentType(java.lang.String name)
name
- the name of the file.
public static MimeType getMimeContentType(java.lang.String ext, java.lang.String def)
ext
- the file name extension.def
- the default type if none is found.
public static java.lang.String getDefaultExtension(MimeType mime)
mime
- the MIME type.
public static java.lang.String getCharSet(java.util.Locale locale)
locale
- the locale.
public static java.lang.String getCharSet(java.util.Locale locale, java.lang.String variant)
locale
- the locale.variant
- a variant field.
public static java.lang.String getCharSet(java.lang.String key)
key
- the key for the charset.
public static java.lang.String getCharSet(java.lang.String key, java.lang.String def)
key
- the key for the charset.def
- the default charset if none is found.
protected static MimeTypeService getService()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |