Package com.jalios.io

Class ImageFormat

java.lang.Object
com.jalios.io.ImageFormat
All Implemented Interfaces:
Comparable<ImageFormat>

public class ImageFormat extends Object implements Comparable<ImageFormat>
This class keeps track of possible export image formats.
Since:
jcms-5.5.0
Author:
Olivier Jaquemet
  • Field Details

  • Method Details

    • 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.
      Returns:
      the ImageFormat
      See Also:
    • 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()
    • compareTo

      public int compareTo(ImageFormat o)
      Specified by:
      compareTo in interface Comparable<ImageFormat>