Package org.apache.commons.imaging
Enum ImageFormats
- java.lang.Object
-
- java.lang.Enum<ImageFormats>
-
- org.apache.commons.imaging.ImageFormats
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ImageFormats>,ImageFormat
public enum ImageFormats extends java.lang.Enum<ImageFormats> implements ImageFormat
Enumerates known image formats.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]extensions
-
Constructor Summary
Constructors Modifier Constructor Description privateImageFormats(java.lang.String... extensions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDefaultExtension()Gets the default file extension.java.lang.String[]getExtensions()Gets the file extension.java.lang.StringgetName()Gets the name.static ImageFormatsvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ImageFormats[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final ImageFormats UNKNOWN
-
BMP
public static final ImageFormats BMP
-
DCX
public static final ImageFormats DCX
-
GIF
public static final ImageFormats GIF
-
ICNS
public static final ImageFormats ICNS
-
ICO
public static final ImageFormats ICO
-
JBIG2
public static final ImageFormats JBIG2
-
JPEG
public static final ImageFormats JPEG
-
PAM
public static final ImageFormats PAM
-
PSD
public static final ImageFormats PSD
-
PBM
public static final ImageFormats PBM
-
PGM
public static final ImageFormats PGM
-
PNM
public static final ImageFormats PNM
-
PPM
public static final ImageFormats PPM
-
PCX
public static final ImageFormats PCX
-
PNG
public static final ImageFormats PNG
-
RGBE
public static final ImageFormats RGBE
-
TGA
public static final ImageFormats TGA
-
TIFF
public static final ImageFormats TIFF
-
WBMP
public static final ImageFormats WBMP
-
WEBP
public static final ImageFormats WEBP
-
XBM
public static final ImageFormats XBM
-
XPM
public static final ImageFormats XPM
-
-
Method Detail
-
values
public static ImageFormats[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ImageFormats c : ImageFormats.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ImageFormats valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getDefaultExtension
public java.lang.String getDefaultExtension()
Description copied from interface:ImageFormatGets the default file extension.- Specified by:
getDefaultExtensionin interfaceImageFormat- Returns:
- the default file extension.
-
getExtensions
public java.lang.String[] getExtensions()
Description copied from interface:ImageFormatGets the file extension.- Specified by:
getExtensionsin interfaceImageFormat- Returns:
- String extension
-
getName
public java.lang.String getName()
Description copied from interface:ImageFormatGets the name.- Specified by:
getNamein interfaceImageFormat- Returns:
- String name
-
-