Package com.jalios.io
Class ImageFormat
java.lang.Object
com.jalios.io.ImageFormat
- All Implemented Interfaces:
Comparable<ImageFormat>
This class keeps track of possible export image formats.
- Since:
- jcms-5.5.0
- Author:
- Olivier Jaquemet
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ImageFormat[]static final ImageFormatstatic final ImageFormatstatic final ImageFormatstatic final ImageFormat -
Method Summary
Modifier and TypeMethodDescriptionintgetAlias()Returns lower case alias of this format as a coma seperated string.Returns the prefered filename extension of this format.static ImageFormatgetImageFormat(String format) Returns an ImageFormat instance from a string.Returns Mime Type of this format.toString()Implementation of toString() method.
-
Field Details
-
JPEG
-
GIF
-
PNG
-
WEBP
-
AVAILABLE_FORMATS
-
-
Method Details
-
getImageFormat
Returns an ImageFormat instance from a string.- Parameters:
format- the ImageFormat corresponding to the given String or null if format not available.- Returns:
- the
ImageFormat - See Also:
-
getExtension
Returns the prefered filename extension of this format. For example: "jpg". -
getMimeType
Returns Mime Type of this format. For example: "image/jpeg". -
getAlias
Returns lower case alias of this format as a coma seperated string. For example: "jpg,jpeg". -
toString
Implementation of toString() method.- Overrides:
toStringin classObject- Returns:
- alias of this format,
getAlias()
-
compareTo
- Specified by:
compareToin interfaceComparable<ImageFormat>
-