Enum Class AttachmentContentType
- All Implemented Interfaces:
Serializable,Comparable<AttachmentContentType>,Constable
Supported content type categories for attachments.
Intended only for internal use and can be removed in the future.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic AttachmentContentTypefromMimeType(String contentType) Detects the content type category from a MIME type string.static AttachmentContentTypeReturns the enum constant of this class with the specified name.static AttachmentContentType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IMAGE
Image content types (image/*). -
TEXT
Text content types (text/*). -
PDF
PDF content types (application/pdf, application/x-pdf). -
AUDIO
Audio content types (audio/*). -
VIDEO
Video content types (video/*). -
UNSUPPORTED
Unsupported or unknown content types.
-
-
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
-
fromMimeType
Detects the content type category from a MIME type string.- Parameters:
contentType- the MIME content type- Returns:
- the corresponding category, or
UNSUPPORTEDif not recognized
-