|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectplay.libs.MimeTypes
public class MimeTypes
MimeTypes utils
| Constructor Summary | |
|---|---|
MimeTypes()
|
|
| Method Summary | |
|---|---|
static String |
getContentType(String filename)
return the content-type from a file name. |
static String |
getContentType(String filename,
String defaultContentType)
return the content-type from a file name. For a text-based content-type, also return the encoding suffix eg. |
static String |
getMimeType(String filename)
return the mimetype from a file name |
static String |
getMimeType(String filename,
String defaultMimeType)
return the mimetype from a file name. |
static boolean |
isValidMimeType(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 String getMimeType(String filename)
filename - the file name
public static String getMimeType(String filename,
String defaultMimeType)
filename - the file namedefaultMimeType - the default mime type to return when no matching mimetype is found
public static String getContentType(String filename)
filename - the file name
public static String getContentType(String filename,
String defaultContentType)
filename - the file namedefaultContentType - the default content-type to return when no matching content-type is found
public static boolean isValidMimeType(String mimeType)
mimeType - the mimeType to verify
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||