Enum Class MIMEType
- All Implemented Interfaces:
Serializable, Comparable<MIMEType>, Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MIMETypebooleanstatic StringremoveParams(String typeString) Removes the (optional) parameters from a valid MIME type string, as defined in the MIME Sniffing standard.toString()static MIMETypeReturns the enum constant of this class with the specified name.static MIMEType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CSS
-
DTBOOK
-
EPUB
-
HTML
-
IMAGE_JPEG
-
IMAGE_GIF
-
IMAGE_PNG
-
OEBPS
-
PACKAGE_DOC
-
SEARCH_KEY_MAP
-
SMIL
-
SVG
-
XHTML
-
OTHER
-
-
Field Details
-
ENUM_MAP
-
definition
-
-
Constructor Details
-
MIMEType
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
toString
-
is
-
get
-
removeParams
Removes the (optional) parameters from a valid MIME type string, as defined in the MIME Sniffing standard. In other words, this returns the essence ("type/subtype") of the MIME type described in the given string.For instance, calling this method on MIME type string
"audio/ogg; codecs=speex"will return the string"audio/ogg".Note: no validation is performed on the MIME type string itself; it simply returns the substring before the first "
;" character.- Parameters:
typeString- a MIME type string- Returns:
- a MIME type string with any parameter removed
-