Package net.anwiba.commons.image.codec
Enum ImageCodec
- java.lang.Object
-
- java.lang.Enum<ImageCodec>
-
- net.anwiba.commons.image.codec.ImageCodec
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ImageCodec>
public enum ImageCodec extends java.lang.Enum<ImageCodec>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract <T,E extends java.lang.Exception>
Taccept(IImageCodecVisitor<T,E> visitor)static ImageCodecgetByExtension(java.lang.String extension)java.lang.StringgetExtension()java.lang.String[]getExtensions()java.lang.StringgetName()booleanisTransparentSupported()static ImageCodecvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ImageCodec[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BMP
public static final ImageCodec BMP
-
GIF
public static final ImageCodec GIF
-
JPEG
public static final ImageCodec JPEG
-
PNG
public static final ImageCodec PNG
-
TIFF
public static final ImageCodec TIFF
-
UNKNOWN
public static final ImageCodec UNKNOWN
-
-
Method Detail
-
values
public static ImageCodec[] 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 (ImageCodec c : ImageCodec.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ImageCodec 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
-
getByExtension
public static ImageCodec getByExtension(java.lang.String extension)
-
accept
public abstract <T,E extends java.lang.Exception> T accept(IImageCodecVisitor<T,E> visitor) throws E extends java.lang.Exception
- Throws:
E extends java.lang.Exception
-
getName
public java.lang.String getName()
-
isTransparentSupported
public boolean isTransparentSupported()
-
getExtension
public java.lang.String getExtension()
-
getExtensions
public java.lang.String[] getExtensions()
-
-