com.jalios.io
Class ImageFormat

java.lang.Object
  extended by com.jalios.io.ImageFormat

public class ImageFormat
extends Object

This class keeps track of possible export image formats.

Since:
jcms-5.5.0
Version:
$Revision: 27751 $
Author:
Olivier Jaquemet

Field Summary
static ImageFormat[] AVAILABLE_FORMATS
           
static ImageFormat GIF
           
static ImageFormat JPEG
           
static String REVISION
           
 
Method Summary
 String getAlias()
          Returns lower case alias of this format as a coma seperated string.
 String getExtension()
          Returns the prefered filename extension of this format.
static ImageFormat getImageFormat(String format)
          Returns an ImageFormat instance from a string.
 String getMimeType()
          Returns Mime Type of this format.
 String toString()
          Implementation of toString() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

JPEG

public static final ImageFormat JPEG

GIF

public static final ImageFormat GIF

AVAILABLE_FORMATS

public static final ImageFormat[] AVAILABLE_FORMATS
Method Detail

getImageFormat

public static ImageFormat getImageFormat(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 String getExtension()
Returns the prefered filename extension of this format. For example: "jpg".


getMimeType

public String getMimeType()
Returns Mime Type of this format. For example: "image/jpeg".


getAlias

public String getAlias()
Returns lower case alias of this format as a coma seperated string. For example: "jpg,jpeg".


toString

public String toString()
Implementation of toString() method.

Overrides:
toString in class Object
Returns:
alias of this format, getAlias()


Copyright © 2001-2010 Jalios SA. All Rights Reserved.