Package com.helger.commons.mime
Enum EMimeContentType
- All Implemented Interfaces:
IHasID<String>,Serializable,Comparable<EMimeContentType>,java.lang.constant.Constable
Determines the most well known MIME content types.
- Author:
- Philip Helger
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionbuildMimeType(String sContentSubType) Build a newMimeTypebased on this MIME content type and the provided sub type.static EMimeContentTypegetFromIDOrNull(String sID) getID()Get the unique ID of this object.getText()booleanCheck if the passed MIME type has the same content type as thisstatic EMimeContentTypeReturns the enum constant of this type with the specified name.static EMimeContentType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
APPLICATION
-
AUDIO
-
EXAMPLE
-
FONT
-
IMAGE
-
MESSAGE
-
MODEL
-
MULTIPART
-
TEXT
-
VIDEO
-
CHEMICAL
-
FLV_APPLICATION
-
INODE
-
WWW
-
X_CONFERENCE
-
X_CONTENT
-
X_DIRECTORY
-
X_EPOC
-
X_WORLD
-
ZZ_APPLICATION
-
_STAR
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getID
Description copied from interface:IHasIDGet the unique ID of this object. If the type isStringthan the returned value must match an XML NMToken expression (so e.g. no ':' in the ID)! -
getText
- Returns:
- The lower case text representation of this MIME content type.
- See Also:
-
buildMimeType
Build a newMimeTypebased on this MIME content type and the provided sub type.- Parameters:
sContentSubType- The content sub type to append. May neither benullnor empty.- Returns:
- Never
null.
-
isTypeOf
Check if the passed MIME type has the same content type as this- Parameters:
sMimeType- The MIME type string to be checked. May benull.- Returns:
trueif the passed MIME type has this content type,falseotherwise
-
getFromIDOrNull
-