API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.imageio. ImageWriter View Source
Author(s)
Since
Version
0.5
Serial
Hierarchy
 Object
      ImageWriter
Implements
 ImageTranscoder
Subclasses
Description
publicabstract abstract class ImageWriter
  An abstract superclass for encoding and writing images.
Constructors
protected ImageWriter (ImageWriterSpi originatingProvider)
  Constructs an ImageWriter and sets its originatingProvider instance variable to the supplied value.
Methods
Hide/Show inherited methods
publicsynchronized void abort ()
  Requests that any current write operation be aborted.
protectedsynchronized boolean abortRequested ()
  Returns true if a request to abort the current write operation has been made since the writer was instantiated or clearAbortRequest was called.
public void addIIOWriteProgressListener (IIOWriteProgressListener listener)
  Adds an IIOWriteProgressListener to the list of registered progress listeners.
public void addIIOWriteWarningListener (IIOWriteWarningListener listener)
  Adds an IIOWriteWarningListener to the list of registered warning listeners.
public boolean canInsertEmpty (int imageIndex) throws IOException
  Returns true if the writer supports the insertion of a new, empty image at the given index.
public boolean canInsertImage (int imageIndex) throws IOException
  Returns true if the writer supports the insertion of a new image at the given index.
public boolean canRemoveImage (int imageIndex) throws IOException
  Returns true if the writer supports the removal of an existing image at the given index.
public boolean canReplaceImageMetadata (int imageIndex) throws IOException
  Returns true if it is possible to replace the image metadata associated with an existing image with index imageIndex.
public boolean canReplacePixels (int imageIndex) throws IOException
  Returns true if the writer allows pixels of the given image to be replaced using the replacePixels methods.
public boolean canReplaceStreamMetadata () throws IOException
  Returns true if it is possible to replace the stream metadata already present in the output.
public boolean canWriteEmpty () throws IOException
  Returns true if the writer supports the writing of a complete image stream consisting of a single image with undefined pixel values and associated metadata and thumbnails to the output.
public boolean canWriteRasters ()
  Returns true if the methods that take an IIOImage parameter are capable of dealing with a Raster (as opposed to RenderedImage) source image.
public boolean canWriteSequence ()
  Returns true if the writer is able to append an image to an image stream that already contains header information and possibly prior images.
protectedsynchronized void clearAbortRequest ()
  Clears any previous abort request.
publicabstract IIOMetadata convertImageMetadata (IIOMetadata inData, ImageTypeSpecifier imageType, ImageWriteParam param) [Specified in ImageTranscoder]
publicabstract IIOMetadata convertStreamMetadata (IIOMetadata inData, ImageWriteParam param) [Specified in ImageTranscoder]
public void dispose ()
  Allows any resources held by this object to be released.
public void endInsertEmpty () throws IOException
  Completes the insertion of a new image that was begun with a prior call to prepareInsertEmpty.
public void endReplacePixels () throws IOException
  Terminates a sequence of calls to replacePixels.
public void endWriteEmpty () throws IOException
  Completes the writing of a new image that was begun with a prior call to prepareWriteEmpty.
public void endWriteSequence () throws IOException
  Completes the writing of a sequence of images begun with prepareWriteSequence.
public Locale getAvailableLocales ()
  Returns an array of Locales that may be used to localize warning listeners and compression settings.
publicabstract IIOMetadata getDefaultImageMetadata (ImageTypeSpecifier imageType, ImageWriteParam param)
  Returns an IIOMetadata object containing default values for encoding an image of the given type.
publicabstract IIOMetadata getDefaultStreamMetadata (ImageWriteParam param)
  Returns an IIOMetadata object containing default values for encoding a stream of images.
public ImageWriteParam getDefaultWriteParam ()
  Returns a new ImageWriteParam object of the appropriate type for this file format containing default values, that is, those values that would be used if no ImageWriteParam object were specified.
public Locale getLocale ()
  Returns the currently set Locale, or null if none has been set.
public int getNumThumbnailsSupported (ImageTypeSpecifier imageType, ImageWriteParam param, IIOMetadata streamMetadata, IIOMetadata imageMetadata)
  Returns the number of thumbnails suported by the format being written, given the image type and any additional write parameters and metadata objects that will be used during encoding.
public ImageWriterSpi getOriginatingProvider ()
  Returns the ImageWriterSpi object that created this ImageWriter, or null if this object was not created through the IIORegistry.
public Object getOutput ()
  Returns the ImageOutputStream or other Object set by the most recent call to the setOutput method.
public Dimension getPreferredThumbnailSizes (ImageTypeSpecifier imageType, ImageWriteParam param, IIOMetadata streamMetadata, IIOMetadata imageMetadata)
  Returns an array of Dimensions indicating the legal size ranges for thumbnail images as they will be encoded in the output file or stream.
public void prepareInsertEmpty (int imageIndex, ImageTypeSpecifier imageType, int width, int height, IIOMetadata imageMetadata, List<BufferedImage> thumbnails, ImageWriteParam param) throws IOException
  Begins the insertion of a new image with undefined pixel values into an existing image stream.
public void prepareReplacePixels (int imageIndex, Rectangle region) throws IOException
  Prepares the writer to handle a series of calls to the replacePixels methods.
public void prepareWriteEmpty (IIOMetadata streamMetadata, ImageTypeSpecifier imageType, int width, int height, IIOMetadata imageMetadata, List<BufferedImage> thumbnails, ImageWriteParam param) throws IOException
  Begins the writing of a complete image stream, consisting of a single image with undefined pixel values and associated metadata and thumbnails, to the output.
public void prepareWriteSequence (IIOMetadata streamMetadata) throws IOException
  Prepares a stream to accept a series of subsequent writeToSequence calls, using the provided stream metadata object.
protected void processImageComplete ()
  Broadcasts the completion of an image write to all registered IIOWriteProgressListeners by calling their imageComplete method.
protected void processImageProgress (float percentageDone)
  Broadcasts the current percentage of image completion to all registered IIOWriteProgressListeners by calling their imageProgress method.
protected void processImageStarted (int imageIndex)
  Broadcasts the start of an image write to all registered IIOWriteProgressListeners by calling their imageStarted method.
protected void processThumbnailComplete ()
  Broadcasts the completion of a thumbnail write to all registered IIOWriteProgressListeners by calling their thumbnailComplete method.
protected void processThumbnailProgress (float percentageDone)
  Broadcasts the current percentage of thumbnail completion to all registered IIOWriteProgressListeners by calling their thumbnailProgress method.
protected void processThumbnailStarted (int imageIndex, int thumbnailIndex)
  Broadcasts the start of a thumbnail write to all registered IIOWriteProgressListeners by calling their thumbnailStarted method.
protected void processWarningOccurred (int imageIndex, String warning)
  Broadcasts a warning message to all registered IIOWriteWarningListeners by calling their warningOccurred method.
protected void processWarningOccurred (int imageIndex, String baseName, String keyword)
  Broadcasts a localized warning message to all registered IIOWriteWarningListeners by calling their warningOccurred method with a string taken from a ResourceBundle.
protected void processWriteAborted ()
  Broadcasts that the write has been aborted to all registered IIOWriteProgressListeners by calling their writeAborted method.
public void removeAllIIOWriteProgressListeners ()
  Removes all currently registered IIOWriteProgressListener objects.
public void removeAllIIOWriteWarningListeners ()
  Removes all currently registered IIOWriteWarningListener objects.
public void removeIIOWriteProgressListener (IIOWriteProgressListener listener)
  Removes an IIOWriteProgressListener from the list of registered progress listeners.
public void removeIIOWriteWarningListener (IIOWriteWarningListener listener)
  Removes an IIOWriteWarningListener from the list of registered warning listeners.
public void removeImage (int imageIndex) throws IOException
  Removes an image from the stream.
public void replaceImageMetadata (int imageIndex, IIOMetadata imageMetadata) throws IOException
  Replaces the image metadata associated with an existing image.
public void replacePixels (Raster raster, ImageWriteParam param) throws IOException
  Replaces a portion of an image already present in the output with a portion of the given Raster.
public void replacePixels (RenderedImage image, ImageWriteParam param) throws IOException
  Replaces a portion of an image already present in the output with a portion of the given image.
public void replaceStreamMetadata (IIOMetadata streamMetadata) throws IOException
  Replaces the stream metadata in the output with new information.
public void reset ()
  Restores the ImageWriter to its initial state.
public void setLocale (Locale locale)
  Sets the current Locale of this ImageWriter to the given value.
public void setOutput (Object output)
  Sets the destination to the given ImageOutputStream or other Object.
public void write (IIOImage image) throws IOException
  Appends a complete image stream containing a single image with default metadata and thumbnails to the output.
publicabstract void write (IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param) throws IOException
  Appends a complete image stream containing a single image and associated stream and image metadata and thumbnails to the output.
public void write (RenderedImage image) throws IOException
  Appends a complete image stream consisting of a single image with default metadata and thumbnails to the output.
public void writeInsert (int imageIndex, IIOImage image, ImageWriteParam param) throws IOException
  Inserts a new image into an existing image stream.
public void writeToSequence (IIOImage image, ImageWriteParam param) throws IOException
  Appends a single image and possibly associated metadata and thumbnails, to the output.
Fields
Hide/Show inherited fields
protected Locale availableLocales
  An array of Locales that may be used to localize warning messages and compression setting values, or null if localization is not supported.
protected Locale locale
  The current Locale to be used for localization, or null if none has been set.
protected ImageWriterSpi originatingProvider
  The ImageWriterSpi that instantiated this object, or null if its identity is not known or none exists.
protected Object output
  The ImageOutputStream or other Object set by setOutput and retrieved by getOutput.
protected List<IIOWriteProgressListener> progressListeners
A List of currently registered IIOWriteProgressListeners, initialized by default null, which is synonymous with an empty List.
protected List<IIOWriteWarningListener> warningListeners
A List of currently registered IIOWriteWarningListeners, initialized by default to null, which is synonymous with an empty List.
protected List<Locale> warningLocales
A List of Locales, one for each element of warningListeners, initialized by default null, which is synonymous with an empty List.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar