public enum ImageFormat extends Enum<ImageFormat>
| Enum Constant and Description |
|---|
bmp |
gif |
jfif |
jpe |
jpeg |
jpg |
png |
tif |
tiff |
| Modifier and Type | Method and Description |
|---|---|
static ImageFormat |
getFormatByExtension(String extension)
Returns the image format retrieved by the given extension (bmp, jpeg...).
|
static ImageFormat |
getFormatByMimeType(String mimeType)
Returns the image format retrieved by the official mimeType according to
|
static ImageFormat |
getFormatByResourceName(String resourceName)
Returns the image format retrieved by the extension of the given resource name.
|
String |
getType() |
static ImageFormat |
valueOf(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.
|
public static final ImageFormat bmp
public static final ImageFormat jpg
public static final ImageFormat jpeg
public static final ImageFormat jpe
public static final ImageFormat jfif
public static final ImageFormat gif
public static final ImageFormat tif
public static final ImageFormat tiff
public static final ImageFormat png
public static ImageFormat[] values()
for (ImageFormat c : ImageFormat.values()) System.out.println(c);
public static ImageFormat valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic String getType()
public static ImageFormat getFormatByExtension(String extension)
extension - public static ImageFormat getFormatByResourceName(String resourceName)
resourceName - public static ImageFormat getFormatByMimeType(String mimeType)
mimeType - Copyright © 2017. All Rights Reserved.