public enum ContentType extends Enum<ContentType>
Enum Constant and Description |
---|
BMP
images
|
CSS
text
Any CSS files that have to be interpreted as such in a Web page must be of the text/css files. |
GIF
images
|
HTML
text
All HTML content should be served with this type. |
JAVA_ARCHIVE
application
|
JAVASCRIPT
text
|
JPEG
images
|
MIDI
audio
|
MPEG
audio
|
OCTET_STREAM
application
This is the default value for a binary files. |
OGG
audio/video/application
|
PDF
application
|
PKCS12
application
|
PLAIN
text
This is the default value for textual files. |
PNG
images
GIF images (lossless compression, superseded by PNG) |
SVGPLUSXML
images
SVG images (vector images). |
VNDDOTMSPOWERPOINT
application
|
WAV
audio
An audio file in the WAVE container format. |
WEBM
audio/video
|
WEBP
images
|
X_ICON
images
Many browsers support icon image types for favicons or similar. |
XML
application
|
XMLPLUSHTML
application
|
Modifier and Type | Method and Description |
---|---|
static String |
get(Type t,
ContentType c) |
static ContentType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ContentType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ContentType PLAIN
public static final ContentType HTML
public static final ContentType CSS
public static final ContentType JAVASCRIPT
public static final ContentType GIF
public static final ContentType PNG
public static final ContentType JPEG
public static final ContentType BMP
public static final ContentType WEBP
public static final ContentType SVGPLUSXML
public static final ContentType X_ICON
public static final ContentType MIDI
public static final ContentType MPEG
public static final ContentType WAV
public static final ContentType WEBM
Audio: An audio file in the WebM container format. Vorbis and Opus are the most common audio codecs.
Video: A video file, possibly with audio, in the WebM container format. VP8 and VP9 are the most common video codecs used within it; Vorbis and Opus the most common audio codecs.
public static final ContentType OGG
Audio: An audio file in the OGG container format. Vorbis is the most common audio codec used in such a container.
Video: A video file, possibly with audio, in the OGG container format. Theora is the usual video codec used within it; Vorbis is the usual audio codec.
public static final ContentType OCTET_STREAM
public static final ContentType PKCS12
public static final ContentType VNDDOTMSPOWERPOINT
public static final ContentType XMLPLUSHTML
public static final ContentType XML
public static final ContentType PDF
public static final ContentType JAVA_ARCHIVE
public static ContentType[] values()
for (ContentType c : ContentType.values()) System.out.println(c);
public static ContentType 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 get(Type t, ContentType c)
Copyright © 2017. All rights reserved.