javax.imageio

Class ImageWriter

Implemented Interfaces:
ImageTranscoder

public abstract class ImageWriter
extends Object
implements ImageTranscoder

Field Summary

protected Locale[]
availableLocales
protected Locale
locale
protected ImageWriterSpi
originatingProvider
protected Object
output
protected List
progressListeners
protected List
warningListeners
protected List
warningLocales

Constructor Summary

ImageWriter(ImageWriterSpi originatingProvider)

Method Summary

void
abort()
protected boolean
abortRequested()
void
addIIOWriteProgressListener(IIOWriteProgressListener listener)
void
addIIOWriteWarningListener(IIOWriteWarningListener listener)
boolean
canInsertEmpty(int imageIndex)
boolean
canInsertImage(int imageIndex)
boolean
canRemoveImage(int imageIndex)
boolean
canReplaceImageMetadata(int imageIndex)
boolean
canReplacePixels(int imageIndex)
boolean
canReplaceStreamMetadata()
boolean
canWriteEmpty()
boolean
canWriteRasters()
boolean
canWriteSequence()
protected void
clearAbortRequest()
IIOMetadata
convertImageMetadata(IIOMetadata inData, ImageTypeSpecifier imageType, ImageWriteParam param)
IIOMetadata
convertStreamMetadata(IIOMetadata inData, ImageWriteParam param)
void
dispose()
Locale[]
getAvailableLocales()
IIOMetadata
getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param)
IIOMetadata
getDefaultStreamMetadata(ImageWriteParam param)
ImageWriteParam
getDefaultWriteParam()
Locale
getLocale()
int
getNumThumbnailsSupported(ImageTypeSpecifier imageType, ImageWriteParam param, IIOMetadata streamMetadata, IIOMetadata imageMetadata)
ImageWriterSpi
getOriginatingProvider()
Object
getOutput()
Dimension[]
getPreferredThumbnailSizes(ImageTypeSpecifier imageType, ImageWriteParam param, IIOMetadata streamMetadata, IIOMetadata imageMetadata)
protected void
processImageComplete()
protected void
processImageProgress(float percentageDone)
protected void
processImageStarted(int imageIndex)
protected void
processThumbnailComplete()
protected void
processThumbnailProgress(float percentageDone)
protected void
processThumbnailStarted(int imageIndex, int thumbnailIndex)
protected void
processWarningOccurred(int imageIndex, String warning)
protected void
processWriteAborted()
void
removeAllIIOWriteProgressListeners()
void
removeAllIIOWriteWarningListeners()
void
removeIIOWriteProgressListener(IIOWriteProgressListener listener)
void
removeIIOWriteWarningListener(IIOWriteWarningListener listener)
void
reset()
void
setLocale(Locale locale)
void
setOutput(Object output)
void
write(IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param)

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

availableLocales

protected Locale[] availableLocales


locale

protected Locale locale


originatingProvider

protected ImageWriterSpi originatingProvider


output

protected Object output


progressListeners

protected List progressListeners


warningListeners

protected List warningListeners


warningLocales

protected List warningLocales

Constructor Details

ImageWriter

protected ImageWriter(ImageWriterSpi originatingProvider)

Method Details

abort

public void abort()


abortRequested

protected boolean abortRequested()


addIIOWriteProgressListener

public void addIIOWriteProgressListener(IIOWriteProgressListener listener)


addIIOWriteWarningListener

public void addIIOWriteWarningListener(IIOWriteWarningListener listener)


canInsertEmpty

public boolean canInsertEmpty(int imageIndex)
            throws IOException


canInsertImage

public boolean canInsertImage(int imageIndex)
            throws IOException


canRemoveImage

public boolean canRemoveImage(int imageIndex)
            throws IOException


canReplaceImageMetadata

public boolean canReplaceImageMetadata(int imageIndex)
            throws IOException


canReplacePixels

public boolean canReplacePixels(int imageIndex)
            throws IOException


canReplaceStreamMetadata

public boolean canReplaceStreamMetadata()
            throws IOException


canWriteEmpty

public boolean canWriteEmpty()
            throws IOException


canWriteRasters

public boolean canWriteRasters()


canWriteSequence

public boolean canWriteSequence()


clearAbortRequest

protected void clearAbortRequest()


convertImageMetadata

public IIOMetadata convertImageMetadata(IIOMetadata inData,
                                        ImageTypeSpecifier imageType,
                                        ImageWriteParam param)
Specified by:
convertImageMetadata in interface ImageTranscoder


convertStreamMetadata

public IIOMetadata convertStreamMetadata(IIOMetadata inData,
                                         ImageWriteParam param)
Specified by:
convertStreamMetadata in interface ImageTranscoder


dispose

public void dispose()


getAvailableLocales

public Locale[] getAvailableLocales()


getDefaultImageMetadata

public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType,
                                           ImageWriteParam param)


getDefaultStreamMetadata

public IIOMetadata getDefaultStreamMetadata(ImageWriteParam param)


getDefaultWriteParam

public ImageWriteParam getDefaultWriteParam()


getLocale

public Locale getLocale()


getNumThumbnailsSupported

public int getNumThumbnailsSupported(ImageTypeSpecifier imageType,
                                     ImageWriteParam param,
                                     IIOMetadata streamMetadata,
                                     IIOMetadata imageMetadata)


getOriginatingProvider

public ImageWriterSpi getOriginatingProvider()


getOutput

public Object getOutput()


getPreferredThumbnailSizes

public Dimension[] getPreferredThumbnailSizes(ImageTypeSpecifier imageType,
                                              ImageWriteParam param,
                                              IIOMetadata streamMetadata,
                                              IIOMetadata imageMetadata)


processImageComplete

protected void processImageComplete()


processImageProgress

protected void processImageProgress(float percentageDone)


processImageStarted

protected void processImageStarted(int imageIndex)


processThumbnailComplete

protected void processThumbnailComplete()


processThumbnailProgress

protected void processThumbnailProgress(float percentageDone)


processThumbnailStarted

protected void processThumbnailStarted(int imageIndex,
                                       int thumbnailIndex)


processWarningOccurred

protected void processWarningOccurred(int imageIndex,
                                      String warning)


processWriteAborted

protected void processWriteAborted()


removeAllIIOWriteProgressListeners

public void removeAllIIOWriteProgressListeners()


removeAllIIOWriteWarningListeners

public void removeAllIIOWriteWarningListeners()


removeIIOWriteProgressListener

public void removeIIOWriteProgressListener(IIOWriteProgressListener listener)


removeIIOWriteWarningListener

public void removeIIOWriteWarningListener(IIOWriteWarningListener listener)


reset

public void reset()


setLocale

public void setLocale(Locale locale)


setOutput

public void setOutput(Object output)


write

public void write(IIOMetadata streamMetadata,
                  IIOImage image,
                  ImageWriteParam param)
            throws IOException


ImageWriter.java -- Encodes raster images. Copyright (C) 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.