Enum MediaMimeType

    • Method Detail

      • values

        public static MediaMimeType[] 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 (MediaMimeType c : MediaMimeType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MediaMimeType valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getName

        public String getName()
        Gets the name (useful for JSTL use)
        Returns:
      • getMimeType

        public String getMimeType()
        Gets the mime type as string.
        Returns:
      • getExtensions

        public List<String> getExtensions()
        Gets supported extensions.
        Returns:
      • isSupportedMediaType

        public boolean isSupportedMediaType()
        Indicates if the mime type is one of handled media types.
        Returns:
        true if it is a handled one, false otherwise.
      • isSupportedPhotoType

        public boolean isSupportedPhotoType()
        Indicates if the mime type is one of handled photo types.
        Returns:
        true if it is a handled one, false otherwise.
      • isSupportedVideoType

        public boolean isSupportedVideoType()
        Indicates if the mime type is one of handled photo types.
        Returns:
        true if it is a handled one, false otherwise.
      • isSupportedSoundType

        public boolean isSupportedSoundType()
        Indicates if the mime type is one of handled photo types.
        Returns:
        true if it is a handled one, false otherwise.
      • isReadablePhoto

        public boolean isReadablePhoto()
        Indicates if the mime type is a photo one and if it is readable by ImageIo.
        Returns:
        true if it is a photo media type that is readable by ImageIo
      • isPreviewablePhoto

        public boolean isPreviewablePhoto()
        Indicates if the mime type is one of photo and if it is previewable.
        Returns:
        true if the mime type is one of a photo and if it is previewable, false otherwise.
      • isIPTCCompliant

        public boolean isIPTCCompliant()
        Indicates if from the mime type can be read IPTC metadata.
        Returns:
        true if IPTC can be read, false otherwise.
      • getSupportedMimeTypes

        public static Set<MediaMimeType> getSupportedMimeTypes​(MediaType mediaType)
        Gets the supported mime types according to the given media type.
        Parameters:
        mediaType - the aimed media type.
        Returns:
        a set of media mime types.