public final class FileTypes
extends java.lang.Object
Constructor and Description |
---|
FileTypes() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getMIMETypeOf(java.lang.String sFileName)
Given a full file name, this method returns the MIME content type based on the file extension.
|
static java.lang.String |
getMIMETypeOfExtension(java.lang.String fileNameExtension)
Get the MIME type of the given extension
|
static java.lang.String |
registerExtension(java.lang.String sExt,
java.lang.String sType)
Register a new file extension
|
public static java.lang.String getMIMETypeOf(java.lang.String sFileName)
sFileName
- the complete file namepublic static java.lang.String getMIMETypeOfExtension(java.lang.String fileNameExtension)
fileNameExtension
- null
if notpublic static java.lang.String registerExtension(java.lang.String sExt, java.lang.String sType)
sExt
- file extensionsType
- MIME type for this file