Java String Format getWriterByFormat(final String format)

Here you can find the source of getWriterByFormat(final String format)

Description

get Writer By Format

License

Open Source License

Declaration

public static ImageWriter getWriterByFormat(final String format) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Iterator;

import javax.imageio.ImageIO;

import javax.imageio.ImageWriter;

public class Main {
    public static ImageWriter getWriterByFormat(final String format) {
        final Iterator<ImageWriter> iter = ImageIO.getImageWritersByFormatName(format);
        if (iter.hasNext()) {
            return iter.next();
        } else {/* w w  w .  j a  va2  s. c  o m*/
            throw new IllegalArgumentException("Image format [" + format + "] is not supported");
        }
    }
}

Related

  1. getImageWriter(ImageTypeSpecifier imageType, String imageFormatName)
  2. getImageWriter(String formatName)
  3. getRequriedArgumentCount(MessageFormat msgFormat)
  4. getStylingHyphenFormat(String cssProperties)
  5. getTextAsFormattedLines(String text, int lineLength)
  6. isDurationFormatPattern(String formatPattern)
  7. isQueryInFormat(String in)
  8. str(final String messageFormat, final Object... args)
  9. StrFormat(String pattern, Object... arguments)