Package com.im.df.api.support
Enum WellKnownMimeTypeXAttributes
- java.lang.Object
-
- java.lang.Enum<WellKnownMimeTypeXAttributes>
-
- com.im.df.api.support.WellKnownMimeTypeXAttributes
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<WellKnownMimeTypeXAttributes>
public enum WellKnownMimeTypeXAttributes extends java.lang.Enum<WellKnownMimeTypeXAttributes>
Well known mime-types XAttributes.- Author:
- MiloslavSram
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<? extends java.lang.String>
extensions()
static java.lang.String
findKeyByDisplayName(java.lang.String displayName)
static java.lang.String[]
getAllDisplayNames()
Gets display names of all well known mime types with no respect todisplay
attribute.java.lang.String
getDisplayName()
static java.lang.String
getDisplayName(java.lang.String key)
static java.lang.String[]
getDisplayNames()
Returns only the display names of well known mime types which have theirdisplay
attribute set totrue
.static java.lang.String[]
getDisplayNames(WellKnownMimeTypeXAttributes[] values)
Returns only the display names of well known mime types which have theirdisplay
attribute set totrue
and are present among givenvalues
.java.lang.String
getKey()
boolean
isImage()
static WellKnownMimeTypeXAttributes
of(java.lang.String mimeType)
Gets mime type instance based on givenmimeType
parameter.static WellKnownMimeTypeXAttributes
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static WellKnownMimeTypeXAttributes[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
IMAGE
public static final WellKnownMimeTypeXAttributes IMAGE
-
IMAGE_JPEG
public static final WellKnownMimeTypeXAttributes IMAGE_JPEG
-
IMAGE_PNG
public static final WellKnownMimeTypeXAttributes IMAGE_PNG
-
IMAGE_GIF
public static final WellKnownMimeTypeXAttributes IMAGE_GIF
-
IMAGE_TIFF
public static final WellKnownMimeTypeXAttributes IMAGE_TIFF
-
IMAGE_BMP
public static final WellKnownMimeTypeXAttributes IMAGE_BMP
-
IMAGE_EPS
public static final WellKnownMimeTypeXAttributes IMAGE_EPS
-
TEXT
public static final WellKnownMimeTypeXAttributes TEXT
-
TEXT_PLAIN
public static final WellKnownMimeTypeXAttributes TEXT_PLAIN
-
TEXT_HTML_XHTML
public static final WellKnownMimeTypeXAttributes TEXT_HTML_XHTML
-
TEXT_XHTML
public static final WellKnownMimeTypeXAttributes TEXT_XHTML
-
TEXT_HTML
public static final WellKnownMimeTypeXAttributes TEXT_HTML
-
OPENOFFICE_WRITER
public static final WellKnownMimeTypeXAttributes OPENOFFICE_WRITER
-
OPENOFFICE_CALC
public static final WellKnownMimeTypeXAttributes OPENOFFICE_CALC
-
OPENOFFICE_IMPRESS
public static final WellKnownMimeTypeXAttributes OPENOFFICE_IMPRESS
-
OPENOFFICE_DRAW
public static final WellKnownMimeTypeXAttributes OPENOFFICE_DRAW
-
OPENOFFICE_CHART
public static final WellKnownMimeTypeXAttributes OPENOFFICE_CHART
-
OPENOFFICE_MATH
public static final WellKnownMimeTypeXAttributes OPENOFFICE_MATH
-
OPENDOCUMENT_ODT
public static final WellKnownMimeTypeXAttributes OPENDOCUMENT_ODT
-
OPENDOCUMENT_ODS
public static final WellKnownMimeTypeXAttributes OPENDOCUMENT_ODS
-
OPENDOCUMENT_ODP
public static final WellKnownMimeTypeXAttributes OPENDOCUMENT_ODP
-
OPENDOCUMENT_ODF
public static final WellKnownMimeTypeXAttributes OPENDOCUMENT_ODF
-
APPLICATION_PDF
public static final WellKnownMimeTypeXAttributes APPLICATION_PDF
-
APPLICATION_MSWORD
public static final WellKnownMimeTypeXAttributes APPLICATION_MSWORD
-
APPLICATION_MSEXCEL
public static final WellKnownMimeTypeXAttributes APPLICATION_MSEXCEL
-
APPLICATION_CUSTOM
public static final WellKnownMimeTypeXAttributes APPLICATION_CUSTOM
-
-
Method Detail
-
values
public static WellKnownMimeTypeXAttributes[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (WellKnownMimeTypeXAttributes c : WellKnownMimeTypeXAttributes.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WellKnownMimeTypeXAttributes valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
of
public static WellKnownMimeTypeXAttributes of(java.lang.String mimeType)
Gets mime type instance based on givenmimeType
parameter.- Parameters:
mimeType
- mime type string representation. Cannot benull
- Returns:
WellKnownMimeTypeXAttributes
instance orAPPLICATION_CUSTOM
when givenmimeType
is not recognized among well known mime types- Since:
- 14.9.22
-
getKey
public java.lang.String getKey()
- Returns:
- the
key
identifier of this mime type. Never returnsnull
.
-
getDisplayName
public java.lang.String getDisplayName()
- Returns:
- formatted
displayName
of this mime type. (E.g.Image (.jpg, jpeg, png, gif, tif, tiff, bmp)
). Never returnsnull
.
-
extensions
public java.util.Set<? extends java.lang.String> extensions()
- Returns:
- immutable set of file extensions for this mime type.
-
isImage
public boolean isImage()
- Returns:
true
if this well known mime type is image type, otherwisefalse
- Since:
- 14.9.22
-
findKeyByDisplayName
public static java.lang.String findKeyByDisplayName(java.lang.String displayName)
-
getDisplayName
public static java.lang.String getDisplayName(java.lang.String key)
-
getAllDisplayNames
public static java.lang.String[] getAllDisplayNames()
Gets display names of all well known mime types with no respect todisplay
attribute.- Returns:
- array of all
displayName
s
-
getDisplayNames
public static java.lang.String[] getDisplayNames()
Returns only the display names of well known mime types which have theirdisplay
attribute set totrue
.- Returns:
- array of all
displayName
s wheredisplay
istrue
-
getDisplayNames
public static java.lang.String[] getDisplayNames(WellKnownMimeTypeXAttributes[] values)
Returns only the display names of well known mime types which have theirdisplay
attribute set totrue
and are present among givenvalues
.- Parameters:
values
- array of well known mime types to get their display names- Returns:
- array of
displayName
s wheredisplay
istrue
and are present amongvalues
-
-