|
xmlgraphics-commons 2.0.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xmlgraphics.image.writer.imageio.ImageIOImageWriter
public class ImageIOImageWriter
ImageWriter implementation that uses Image I/O to write images.
Constructor Summary | |
---|---|
ImageIOImageWriter(String mime)
Main constructor. |
Method Summary | |
---|---|
MultiImageWriter |
createMultiImageWriter(OutputStream out)
Creates a MultiImageWriter instance that lets you put multiple pages into a single file if the format supports it. |
protected IIOMetadata |
createStreamMetadata(ImageWriter writer,
ImageWriteParam writeParam,
ImageWriterParams params)
Creates the stream metadata for image. |
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(RenderedImage image,
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageIOImageWriter(String mime)
mime
- the MIME type of the image formatMethod Detail |
---|
public void writeImage(RenderedImage image, OutputStream out) throws IOException
writeImage
in interface ImageWriter
image
- the image to be encodedout
- the OutputStream to write to
IOException
- In case of an /IO problempublic void writeImage(RenderedImage image, OutputStream out, ImageWriterParams params) throws IOException
writeImage
in interface ImageWriter
image
- the image to be encodedout
- the OutputStream to write toparams
- a parameters object to customize the encoding.
IOException
- In case of an /IO problemprotected IIOMetadata createStreamMetadata(ImageWriter writer, ImageWriteParam writeParam, ImageWriterParams params)
writer
- the image writewriteParam
- the ImageIO write parametersparams
- the ImageWriter write parameters
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 instance
protected IIOMetadata updateMetadata(RenderedImage image, IIOMetadata meta, ImageWriterParams params)
image
- the current image being renderedmeta
- the metadataparams
- the parameters
protected static IIOMetadataNode getChildNode(Node n, String name)
n
- the base nodename
- the name of the child
public String getMIMEType()
getMIMEType
in interface ImageWriter
public boolean isFunctional()
isFunctional
in interface ImageWriter
public void warningOccurred(ImageWriter source, int imageIndex, String warning)
warningOccurred
in interface IIOWriteWarningListener
public MultiImageWriter createMultiImageWriter(OutputStream out) throws IOException
createMultiImageWriter
in interface ImageWriter
out
- the OutputStream to write the image to
IOException
- In case of an /IO problempublic boolean supportsMultiImageWriter()
supportsMultiImageWriter
in interface ImageWriter
|
xmlgraphics-commons 2.0.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |