Enum WellKnownMimeTypeXAttributes

    • 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 name
        java.lang.NullPointerException - if the argument is null
      • of

        public static WellKnownMimeTypeXAttributes of​(java.lang.String mimeType)
        Gets mime type instance based on given mimeType parameter.
        Parameters:
        mimeType - mime type string representation. Cannot be null
        Returns:
        WellKnownMimeTypeXAttributes instance or APPLICATION_CUSTOM when given mimeType 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 returns null.
      • getDisplayName

        public java.lang.String getDisplayName()
        Returns:
        formatted displayName of this mime type. (E.g. Image (.jpg, jpeg, png, gif, tif, tiff, bmp)). Never returns null.
      • 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, otherwise false
        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 to display attribute.
        Returns:
        array of all displayNames
      • getDisplayNames

        public static java.lang.String[] getDisplayNames()
        Returns only the display names of well known mime types which have their display attribute set to true.
        Returns:
        array of all displayNames where display is true
      • getDisplayNames

        public static java.lang.String[] getDisplayNames​(WellKnownMimeTypeXAttributes[] values)
        Returns only the display names of well known mime types which have their display attribute set to true and are present among given values.
        Parameters:
        values - array of well known mime types to get their display names
        Returns:
        array of displayNames where display is true and are present among values