List of utility methods to do ImageIO Supported Writer
String | getImageFormats() 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(); |
boolean | isImage(String fileName) is Image if (fileName == null || "".equals(fileName)) { return false; int index = fileName.lastIndexOf("."); if (index < 1) { return false; String fileType = getFileTypeName(fileName); ... |
boolean | isImg(String format) is Img String[] formatNames = ImageIO.getReaderFormatNames(); for (String name : formatNames) { if (name.equalsIgnoreCase(format)) { return true; return false; |
void | printImageFormatNames() 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; |