Enum Class MediaMimeType
- All Implemented Interfaces:
Serializable,Comparable<MediaMimeType>,Constable
Enumeration for all supported media types in the gallery component.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Set<MediaMimeType>static final Set<MediaMimeType>static final Set<MediaMimeType> -
Method Summary
Modifier and TypeMethodDescriptionstatic MediaMimeTypeFinds from the given file the correspondingMediaMimeTypestatic MediaMimeTypefromMimeType(String mimeType) Gets the correspondingMediaMimeTypeof specified one as string.getName()static Set<MediaMimeType>getSupportedMimeTypes(MediaType mediaType) Gets the supported mime types according to the given media type.booleanIndicates if from the mime type can be read IPTC metadata.booleanIndicates if the mime type is one of photo and if it is previewable.booleanIndicates if the mime type is a photo one and if it is readable by ImageIo.booleanIndicates if the mime type is one of handled media types.booleanIndicates if the mime type is one of handled photo types.booleanIndicates if the mime type is one of handled photo types.booleanIndicates if the mime type is one of handled photo types.static MediaMimeTypeReturns the enum constant of this class with the specified name.static MediaMimeType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BMP
-
GIF
-
PNG
-
JPG
-
TIFF
-
WEBP
-
MOV
-
MP4
-
FLV
-
MP3
-
ERROR
-
-
Field Details
-
PHOTOS
-
VIDEOS
-
SOUNDS
-
-
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
-
fromFile
Finds from the given file the correspondingMediaMimeType- Parameters:
file- the file- Returns:
MediaMimeType
-
fromMimeType
Gets the correspondingMediaMimeTypeof specified one as string.- Parameters:
mimeType- the MIME type- Returns:
MediaMimeType
-
getName
-
getMimeType
-
getExtensions
-
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
- See Also:
-
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
Gets the supported mime types according to the given media type.- Parameters:
mediaType- the aimed media type.- Returns:
- a set of media mime types.
-