|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object play.libs.MimeTypes
public class MimeTypes
MimeTypes utils
Constructor Summary | |
---|---|
MimeTypes()
|
Method Summary | |
---|---|
static java.lang.String |
getContentType(java.lang.String filename)
return the content-type from a file name. |
static java.lang.String |
getContentType(java.lang.String filename,
java.lang.String defaultContentType)
return the content-type from a file name. For a text-based content-type, also return the encoding suffix eg. |
static java.lang.String |
getMimeType(java.lang.String filename)
return the mimetype from a file name |
static java.lang.String |
getMimeType(java.lang.String filename,
java.lang.String defaultMimeType)
return the mimetype from a file name. |
static boolean |
isValidMimeType(java.lang.String mimeType)
check the mimetype is referenced in the mimetypes database |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MimeTypes()
Method Detail |
---|
public static java.lang.String getMimeType(java.lang.String filename)
filename
- the file name
public static java.lang.String getMimeType(java.lang.String filename, java.lang.String defaultMimeType)
filename
- the file namedefaultMimeType
- the default mime type to return when no matching mimetype is found
public static java.lang.String getContentType(java.lang.String filename)
filename
- the file name
public static java.lang.String getContentType(java.lang.String filename, java.lang.String defaultContentType)
filename
- the file namedefaultContentType
- the default content-type to return when no matching content-type is found
public static boolean isValidMimeType(java.lang.String mimeType)
mimeType
- the mimeType to verify
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |