Package com.jalios.io
Class ImageFormat
- java.lang.Object
-
- com.jalios.io.ImageFormat
-
public class ImageFormat extends java.lang.Object
This class keeps track of possible export image formats.- Since:
- jcms-5.5.0
- Version:
- $Revision: 130130 $
- Author:
- Olivier Jaquemet
-
-
Field Summary
Fields Modifier and Type Field Description static ImageFormat[]
AVAILABLE_FORMATS
static ImageFormat
GIF
static ImageFormat
JPEG
static ImageFormat
PNG
static java.lang.String
REVISION
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAlias()
Returns lower case alias of this format as a coma seperated string.java.lang.String
getExtension()
Returns the prefered filename extension of this format.static ImageFormat
getImageFormat(java.lang.String format)
Returns an ImageFormat instance from a string.java.lang.String
getMimeType()
Returns Mime Type of this format.java.lang.String
toString()
Implementation of toString() method.
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
JPEG
public static final ImageFormat JPEG
-
GIF
public static final ImageFormat GIF
-
PNG
public static final ImageFormat PNG
-
AVAILABLE_FORMATS
public static final ImageFormat[] AVAILABLE_FORMATS
-
-
Method Detail
-
getImageFormat
public static ImageFormat getImageFormat(java.lang.String format)
Returns an ImageFormat instance from a string.- Parameters:
format
- the ImageFormat corresponding to the given String or null if format not available.- See Also:
AVAILABLE_FORMATS
-
getExtension
public java.lang.String getExtension()
Returns the prefered filename extension of this format. For example: "jpg".
-
getMimeType
public java.lang.String getMimeType()
Returns Mime Type of this format. For example: "image/jpeg".
-
getAlias
public java.lang.String getAlias()
Returns lower case alias of this format as a coma seperated string. For example: "jpg,jpeg".
-
toString
public java.lang.String toString()
Implementation of toString() method.- Overrides:
toString
in classjava.lang.Object
- Returns:
- alias of this format,
getAlias()
-
-