public enum MimeType extends Enum<MimeType>
| Enum Constant and Description |
|---|
BMP |
CITRIX_PJPEG |
GIF |
HTML |
JPEG |
JSON |
MP3 |
OGG |
PDF |
PJPEG |
PNG |
RDF |
TEXT |
TIF |
WAV |
XML |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
getAllMimeTypes()
Retrieve a list of all mime types.
|
static String |
getFileExtension(String mimetype)
Get file extension, returning an empty string if unknown
for supplied mime type.
|
String[] |
getFileExtensions() |
static MimeType |
getForFileExtension(String fileExtension)
Lookup method for mimetype string
|
static MimeType |
getForMimeType(String mimetype)
Lookup method for mimetype string
|
static List<String> |
getImageMimeTypes()
Retrieve a list of image mime types supported.
|
String |
getMimeType() |
String |
toString() |
static MimeType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MimeType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MimeType HTML
public static final MimeType XML
public static final MimeType TEXT
public static final MimeType RDF
public static final MimeType JSON
public static final MimeType PDF
public static final MimeType JPEG
public static final MimeType PJPEG
public static final MimeType CITRIX_PJPEG
public static final MimeType GIF
public static final MimeType TIF
public static final MimeType BMP
public static final MimeType PNG
public static final MimeType MP3
public static final MimeType OGG
public static final MimeType WAV
public static MimeType[] values()
for (MimeType c : MimeType.values()) System.out.println(c);
public static MimeType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic static String getFileExtension(String mimetype)
mimetype - public static MimeType getForMimeType(String mimetype)
mimetype - public static MimeType getForFileExtension(String fileExtension)
public static List<String> getAllMimeTypes()
public static List<String> getImageMimeTypes()
public String getMimeType()
public String toString()
toString in class Enum<MimeType>Enum.toString()public String[] getFileExtensions()
Copyright © 2014. All rights reserved.