Java Utililty Methods ImageIO Supported Writer

List of utility methods to do ImageIO Supported Writer

Description

The list of methods to do ImageIO Supported Writer are organized into topic(s).

Method

StringgetImageFormats()
get Image Formats
StringBuilder retval = new StringBuilder();
String[] formats = ImageIO.getReaderFormatNames();
for (int i = 0; i < formats.length; i++) {
    retval.append(formats[i]);
    if (i + 1 < formats.length) {
        retval.append(",");
return retval.toString();
booleanisImage(String fileName)
is Image
if (fileName == null || "".equals(fileName)) {
    return false;
int index = fileName.lastIndexOf(".");
if (index < 1) {
    return false;
String fileType = getFileTypeName(fileName);
...
booleanisImg(String format)
is Img
String[] formatNames = ImageIO.getReaderFormatNames();
for (String name : formatNames) {
    if (name.equalsIgnoreCase(format)) {
        return true;
return false;
voidprintImageFormatNames()
print Image Format Names
System.out.println("Informa Names:");
for (String s : ImageIO.getReaderFormatNames()) {
    System.out.println(s);
String[]supportedSendTypes()
Return an array of the types supported by the current host for sendType arguments.
String[] imageTypes = ImageIO.getWriterFormatNames();
String[] result = new String[imageTypes.length + 2];
result[0] = "application/json";
result[1] = "text/plain";
System.arraycopy(imageTypes, 0, result, 2, imageTypes.length);
return result;