ImageWriter objects are normally instantiated by
the service provider class for the specific format. Service
provider classes are registered with the IIORegistry,
which uses them for format recognition and presentation of
available format readers and writers.
ImageReader, ImageWriteParam, javax.imageio.spi.IIORegistry , javax.imageio.spi.ImageWriterSpi
| Modifier and Type | Field and Description |
|---|---|
| private boolean | abortFlag
If |
| protected Locale[] | availableLocales
An array of |
| protected Locale | locale
The current |
| protected ImageWriterSpi | originatingProvider
The |
| protected Object | output
The |
| protected List | progressListeners
A |
| protected List | warningListeners
A |
| protected List | warningLocales
A |
| Access | Constructor and Description |
|---|---|
| protected | ImageWriter(ImageWriterSpi
the originatingProvider)ImageWriterSpi that
is constructing this object, or null.Constructs an |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | |
| protected synchronized boolean | Returns: true if the current write operation should
be aborted.Returns |
| public void | addIIOWriteProgressListener(IIOWriteProgressListener
an listener)IIOWriteProgressListener to be
registered.Adds an |
| public void | addIIOWriteWarningListener(IIOWriteWarningListener
an listener)IIOWriteWarningListener to be
registered.Adds an |
| public boolean | Returns: true if an empty image may be inserted at
the given index.the index at which the image is to be
inserted. imageIndex)Returns |
| public boolean | Returns: true if an image may be inserted at the
given index.the index at which the image is to be
inserted. imageIndex)Returns |
| public boolean | Returns: true if it is possible to remove the given
image.the index of the image to be removed. imageIndex)Returns |
| public boolean | Returns: true if the image metadata of the given
image can be replaced.the index of the image whose metadata is to
be replaced. imageIndex)Returns |
| public boolean | Returns: true if the pixels of the given
image can be replaced.the index of the image whose pixels are to be
replaced. imageIndex)Returns |
| public boolean | Returns: true if replacement of stream metadata is
allowed.Returns |
| public boolean | Returns: true if the writing of complete image
stream with contents to be defined later is supported.Returns |
| public boolean | Returns: true if Raster sources are
supported.Returns |
| public boolean | Returns: true if images may be appended sequentially.Returns |
| protected synchronized void | |
| public abstract IIOMetadata | convertImageMetadata(IIOMetadata inData, ImageTypeSpecifier imageType, ImageWriteParam param)
Redeclares javax. Returns an |
| public abstract IIOMetadata | convertStreamMetadata(IIOMetadata inData, ImageWriteParam param)
Redeclares javax. Returns an |
| public void | |
| public void | endInsertEmpty()
Completes the insertion of a new image that was begun with a
prior call to |
| public void | |
| public void | endWriteEmpty()
Completes the writing of a new image that was begun with a
prior call to |
| public void | |
| public Locale[] | Returns: an array ofLocales that may be used as
arguments to setLocale, or null.Returns an array of |
| public abstract IIOMetadata | Returns: anIIOMetadata object.an imageType, ImageWriteParam ImageTypeSpecifier indicating the
format of the image to be written later.an param)ImageWriteParam that will be used to
encode the image, or null.Returns an |
| public abstract IIOMetadata | Returns: anIIOMetadata object.an param)ImageWriteParam that will be used to
encode the image, or null.Returns an |
| public ImageWriteParam | Returns: a newImageWriteParam object containing
default values.Returns a new |
| public Locale | Returns: the currentLocale, or null.Returns the currently set |
| public int | Returns: the number of thumbnails that may be written given the supplied parameters, or-1 if insufficient
information is available.an imageType, ImageWriteParam ImageTypeSpecifier indicating
the type of image to be written, or null.the param, IIOMetadata ImageWriteParam that will be used for
writing, or null.an streamMetadata, IIOMetadata IIOMetadata object that will
be used for writing, or null.an imageMetadata)IIOMetadata object that will
be used for writing, or null.Returns the number of thumbnails supported 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 | Returns: anImageWriterSpi, or null.Returns the |
| public Object | Returns: theObject that was specified using
setOutput, or null.Returns the |
| public Dimension[] | Returns: an array ofDimensions with an even length
of at least two, or null.an imageType, ImageWriteParam ImageTypeSpecifier indicating the
type of image to be written, or null.the param, IIOMetadata ImageWriteParam that will be used for
writing, or null.an streamMetadata, IIOMetadata IIOMetadata object that will
be used for writing, or null.an imageMetadata)IIOMetadata object that will
be used for writing, or null.Returns an array of |
| public void | prepareInsertEmpty(int
the index at which to write the image. imageIndex, ImageTypeSpecifier an imageType, int ImageTypeSpecifier describing
the layout of the image.the width of the image. width, int the height of the image. height, IIOMetadata an imageMetadata, List<? extends BufferedImage> IIOMetadata object
representing image metadata, or null.a thumbnails, ImageWriteParam List of
BufferedImage thumbnails for this image, or
null.an param)ImageWriteParam, or
null to use a default
ImageWriteParam.Begins the insertion of a new image with undefined pixel values into an existing image stream. |
| public void | prepareReplacePixels(int
the index of the image whose pixels are to be
replaced. imageIndex, Rectangle a region)Rectangle that will be used to clip
future pixel regions.Prepares the writer to handle a series of calls to the
|
| public void | prepareWriteEmpty(IIOMetadata
an streamMetadata, ImageTypeSpecifier IIOMetadata object representing
stream metadata, or null to use default values.an imageType, int ImageTypeSpecifier describing
the layout of the image.the width of the image. width, int the height of the image. height, IIOMetadata an imageMetadata, List<? extends BufferedImage> IIOMetadata object
representing image metadata, or null.a thumbnails, ImageWriteParam List of
BufferedImage thumbnails for this image, or
null.an param)ImageWriteParam, or
null to use a default
ImageWriteParam.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
A stream metadata object, or streamMetadata)null.Prepares a stream to accept a series of subsequent
|
| protected void | processImageComplete()
Broadcasts the completion of an image write to all registered
|
| protected void | processImageProgress(float
the current percentage of completion,
as a percentageDone)float.Broadcasts the current percentage of image completion to all
registered |
| protected void | processImageStarted(int
the index of the image about to be written. imageIndex)Broadcasts the start of an image write to all registered
|
| protected void | processThumbnailComplete()
Broadcasts the completion of a thumbnail write to all registered
|
| protected void | processThumbnailProgress(float
the current percentage of completion,
as a percentageDone)float.Broadcasts the current percentage of thumbnail completion to
all registered |
| protected void | processThumbnailStarted(int
the index of the image associated with the
thumbnail. imageIndex, int the index of the thumbnail. thumbnailIndex)Broadcasts the start of a thumbnail write to all registered
|
| protected void | processWarningOccurred(int
the index of the image on which the warning
occurred. imageIndex, String the warning message. warning)Broadcasts a warning message to all registered
|
| protected void | processWarningOccurred(int
the index of the image on which the warning
occurred. imageIndex, String the base name of a set of
baseName, String ResourceBundles containing localized warning
messages.the keyword used to index the warning message
within the set of keyword)ResourceBundles.Broadcasts a localized warning message to all registered
|
| protected void | processWriteAborted()
Broadcasts that the write has been aborted to all registered
|
| public void | removeAllIIOWriteProgressListeners()
Removes all currently registered
|
| public void | removeAllIIOWriteWarningListeners()
Removes all currently registered
|
| public void | removeIIOWriteProgressListener(IIOWriteProgressListener
an listener)IIOWriteProgressListener to be
deregistered.Removes an |
| public void | removeIIOWriteWarningListener(IIOWriteWarningListener
an listener)IIOWriteWarningListener to be
deregistered.Removes an |
| public void | |
| public void | replaceImageMetadata(int
the index of the image whose metadata is to
be replaced. imageIndex, IIOMetadata an imageMetadata)IIOMetadata object
representing image metadata, or null.Replaces the image metadata associated with an existing image. |
| public void | replacePixels(RenderedImage
a image, ImageWriteParam RenderedImage containing source
pixels.an param)ImageWriteParam, or
null to use a default
ImageWriteParam.Replaces a portion of an image already present in the output with a portion of the given image. |
| public void | replacePixels(Raster
a raster, ImageWriteParam Raster containing source
pixels.an param)ImageWriteParam, or
null to use a default
ImageWriteParam.Replaces a portion of an image already present in the output
with a portion of the given |
| public void | replaceStreamMetadata(IIOMetadata
an streamMetadata)IIOMetadata object representing
stream metadata, or null to use default values.Replaces the stream metadata in the output with new information. |
| public void | |
| public void | |
| public void | |
| private void | |
| public abstract void | write(IIOMetadata
an streamMetadata, IIOImage IIOMetadata object representing
stream metadata, or null to use default values.an image, ImageWriteParam IIOImage object containing an
image, thumbnails, and metadata to be written.an param)ImageWriteParam, or
null to use a default
ImageWriteParam.Appends a complete image stream containing a single image and associated stream and image metadata and thumbnails to the output. |
| public void | |
| public void | write(RenderedImage
a image)RenderedImage to be written.Appends a complete image stream consisting of a single image with default metadata and thumbnails to the output. |
| public void | writeInsert(int
the index at which to write the image. imageIndex, IIOImage an image, ImageWriteParam IIOImage object containing an
image, thumbnails, and metadata to be written.an param)ImageWriteParam, or
null to use a default
ImageWriteParam.Inserts a new image into an existing image stream. |
| public void | writeToSequence(IIOImage
an image, ImageWriteParam IIOImage object containing an
image, thumbnails, and metadata to be written.an param)ImageWriteParam, or
null to use a default
ImageWriteParam.Appends a single image and possibly associated metadata and thumbnails, to the output. |