public class ImageIOImageWriter extends Object implements ImageWriter, IIOWriteWarningListener
| Constructor and Description |
|---|
ImageIOImageWriter(String mime)
Main constructor.
|
| Modifier and Type | Method and Description |
|---|---|
MultiImageWriter |
createMultiImageWriter(OutputStream out)
Creates a MultiImageWriter instance that lets you put multiple pages into a single file
if the format supports it.
|
protected static IIOMetadataNode |
getChildNode(Node n,
String name)
Returns a specific metadata child node
|
protected ImageWriteParam |
getDefaultWriteParam(ImageWriter iiowriter,
RenderedImage image,
ImageWriterParams params)
Returns the default write parameters for encoding the image.
|
String |
getMIMEType() |
boolean |
isFunctional() |
boolean |
supportsMultiImageWriter() |
protected IIOMetadata |
updateMetadata(IIOMetadata meta,
ImageWriterParams params)
Updates the metadata information based on the parameters to this writer.
|
void |
warningOccurred(ImageWriter source,
int imageIndex,
String warning) |
void |
writeImage(RenderedImage image,
OutputStream out)
Encodes an image and writes it to an OutputStream.
|
void |
writeImage(RenderedImage image,
OutputStream out,
ImageWriterParams params)
Encodes an image and writes it to an OutputStream.
|
public ImageIOImageWriter(String mime)
mime - the MIME type of the image formatpublic void writeImage(RenderedImage image, OutputStream out) throws IOException
ImageWriterwriteImage in interface ImageWriterimage - the image to be encodedout - the OutputStream to write toIOException - In case of an /IO problemImageWriter.writeImage(java.awt.image.RenderedImage, java.io.OutputStream)public void writeImage(RenderedImage image, OutputStream out, ImageWriterParams params) throws IOException
ImageWriterwriteImage in interface ImageWriterimage - the image to be encodedout - the OutputStream to write toparams - a parameters object to customize the encoding.IOException - In case of an /IO problemImageWriter.writeImage(java.awt.image.RenderedImage, java.io.OutputStream, ImageWriterParams)protected ImageWriteParam getDefaultWriteParam(ImageWriter iiowriter, RenderedImage image, ImageWriterParams params)
iiowriter - The IIO ImageWriter that will be usedimage - the image to be encodedparams - the parameters for this writer instanceprotected IIOMetadata updateMetadata(IIOMetadata meta, ImageWriterParams params)
meta - the metadataparams - the parametersprotected static IIOMetadataNode getChildNode(Node n, String name)
n - the base nodename - the name of the childpublic String getMIMEType()
getMIMEType in interface ImageWriterImageWriter.getMIMEType()public boolean isFunctional()
isFunctional in interface ImageWriterImageWriter.isFunctional()public void warningOccurred(ImageWriter source, int imageIndex, String warning)
warningOccurred in interface IIOWriteWarningListenerIIOWriteWarningListener.warningOccurred(
javax.imageio.ImageWriter, int, java.lang.String)public MultiImageWriter createMultiImageWriter(OutputStream out) throws IOException
ImageWritercreateMultiImageWriter in interface ImageWriterout - the OutputStream to write the image toIOException - In case of an /IO problemImageWriter.createMultiImageWriter(
java.io.OutputStream)public boolean supportsMultiImageWriter()
supportsMultiImageWriter in interface ImageWriterImageWriter.supportsMultiImageWriter()Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.