Package nl.vpro.domain.image
Enum ImageFormat
- java.lang.Object
-
- java.lang.Enum<ImageFormat>
-
- nl.vpro.domain.image.ImageFormat
-
- All Implemented Interfaces:
Serializable,Comparable<ImageFormat>
public enum ImageFormat extends Enum<ImageFormat>
Recognized image formats.
-
-
Field Summary
Fields Modifier and Type Field Description static ImageFormatAS_IS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NonNull Optional<ImageFormat>forFileExtension(String extension)static ImageFormatforMimeType(String mimeType)StringgetFileExtension()StringgetMimeType()booleansupportsAnimation()static ImageFormatvalueOf(String name)Returns the enum constant of this type with the specified name.static ImageFormat[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BMP
public static final ImageFormat BMP
-
GIF
public static final ImageFormat GIF
-
IEF
public static final ImageFormat IEF
-
IFF
public static final ImageFormat IFF
-
JPG
public static final ImageFormat JPG
-
JFIF
public static final ImageFormat JFIF
-
PNG
public static final ImageFormat PNG
-
PBM
public static final ImageFormat PBM
-
PGM
public static final ImageFormat PGM
-
PNM
public static final ImageFormat PNM
-
PPM
public static final ImageFormat PPM
-
SVG
public static final ImageFormat SVG
-
RAS
public static final ImageFormat RAS
-
RGB
public static final ImageFormat RGB
-
TIF
public static final ImageFormat TIF
-
XBM
public static final ImageFormat XBM
-
XPM
public static final ImageFormat XPM
-
WEBP
public static final ImageFormat WEBP
-
-
Field Detail
-
AS_IS
public static final ImageFormat AS_IS
-
-
Method Detail
-
values
public static ImageFormat[] 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 (ImageFormat c : ImageFormat.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ImageFormat valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forFileExtension
public static @NonNull Optional<ImageFormat> forFileExtension(String extension) throws UnsupportedImageFormatException
- Throws:
UnsupportedImageFormatException
-
forMimeType
public static ImageFormat forMimeType(String mimeType) throws UnsupportedImageFormatException
- Throws:
UnsupportedImageFormatException
-
getFileExtension
public String getFileExtension()
-
supportsAnimation
public boolean supportsAnimation()
-
getMimeType
public String getMimeType()
-
-