public abstract class ImageWriter extends java.lang.Object implements ImageTranscoder
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Locale[] |
availableLocales
All locales available for localization of warning messages, or
null if localization is not supported.
|
protected java.util.Locale |
locale
The current locale used to localize warning messages, or null if
no locale has been set.
|
protected javax.imageio.spi.ImageWriterSpi |
originatingProvider
The image writer SPI that instantiated this writer.
|
protected java.lang.Object |
output
An ImageInputStream to which image data is written.
|
protected java.util.List<javax.imageio.event.IIOWriteProgressListener> |
progressListeners
A list of installed progress listeners.
|
protected java.util.List<javax.imageio.event.IIOWriteWarningListener> |
warningListeners
A list of installed warning listeners.
|
protected java.util.List<java.util.Locale> |
warningLocales
A list of warning locales corresponding with the list of
installed warning listeners.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ImageWriter(javax.imageio.spi.ImageWriterSpi originatingProvider)
Construct an image writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Request that writing be aborted.
|
protected boolean |
abortRequested()
Check if the abort flag is set.
|
void |
addIIOWriteProgressListener(javax.imageio.event.IIOWriteProgressListener listener)
Install a write progress listener.
|
void |
addIIOWriteWarningListener(javax.imageio.event.IIOWriteWarningListener listener)
Install a write warning listener.
|
boolean |
canInsertEmpty(int imageIndex)
Check whether a new empty image can be inserted at the given
frame index.
|
boolean |
canInsertImage(int imageIndex)
Check whether an image can be inserted at the given frame index.
|
boolean |
canRemoveImage(int imageIndex)
Check whether an image can be removed from the given frame index.
|
boolean |
canReplaceImageMetadata(int imageIndex)
Check whether the metadata associated the image at the given
frame index can be replaced.
|
boolean |
canReplacePixels(int imageIndex)
Check whether the pixels within the image at the given index can
be replaced.
|
boolean |
canReplaceStreamMetadata()
Check whether the metadata associated the entire image stream can
be replaced.
|
boolean |
canWriteEmpty()
Check whether an entire empty image, including empty metadata and
empty thumbnails, can be written to the output stream, leaving
pixel values to be filled in later using the replacePixels
methods.
|
boolean |
canWriteRasters()
Check if IIOImages containing raster data are supported.
|
boolean |
canWriteSequence()
Check if an image can be appended at the end of the current list
of images even if prior images have already been written.
|
protected void |
clearAbortRequest()
Clear the abort flag.
|
abstract javax.imageio.metadata.IIOMetadata |
convertImageMetadata(javax.imageio.metadata.IIOMetadata inData,
ImageTypeSpecifier imageType,
ImageWriteParam param)
Convert IIOMetadata from an input reader format, returning an
IIOMetadata suitable for use by an image writer.
|
abstract javax.imageio.metadata.IIOMetadata |
convertStreamMetadata(javax.imageio.metadata.IIOMetadata inData,
ImageWriteParam param)
Convert IIOMetadata from an input stream format, returning an
IIOMetadata suitable for use by an image writer.
|
void |
dispose()
Releases any resources allocated to this object.
|
void |
endInsertEmpty()
Complete inserting an empty image in the output stream.
|
void |
endReplacePixels()
Complete replacing pixels in an image in the output stream.
|
void |
endWriteEmpty()
Complete writing an empty image to the image output stream.
|
void |
endWriteSequence()
Complete writing a sequence of images to the output stream.
|
java.util.Locale[] |
getAvailableLocales()
Retrieve the available locales.
|
abstract javax.imageio.metadata.IIOMetadata |
getDefaultImageMetadata(ImageTypeSpecifier imageType,
ImageWriteParam param)
Get a metadata object appropriate for encoding an image specified
by the given image type specifier and optional image write
parameters.
|
abstract javax.imageio.metadata.IIOMetadata |
getDefaultStreamMetadata(ImageWriteParam param)
Get a metadata object appropriate for encoding the default image
type handled by this writer, optionally considering image write
parameters.
|
ImageWriteParam |
getDefaultWriteParam()
Retrieve the default write parameters for this writer's image
format.
|
java.util.Locale |
getLocale()
Get this writer's locale.
|
int |
getNumThumbnailsSupported(ImageTypeSpecifier imageType,
ImageWriteParam param,
javax.imageio.metadata.IIOMetadata streamMetadata,
javax.imageio.metadata.IIOMetadata imageMetadata)
Get the number of thumbnails supported by this image writer,
based on the given image type, image writing parameters, and
stream and image metadata.
|
javax.imageio.spi.ImageWriterSpi |
getOriginatingProvider()
Get the ImageWriterSpi that created this writer or null.
|
java.lang.Object |
getOutput()
Get this reader's image output destination.
|
java.awt.Dimension[] |
getPreferredThumbnailSizes(ImageTypeSpecifier imageType,
ImageWriteParam param,
javax.imageio.metadata.IIOMetadata streamMetadata,
javax.imageio.metadata.IIOMetadata imageMetadata)
Get the preferred sizes for thumbnails based on the given image
type, image writing parameters, and stream and image metadata.
|
void |
prepareInsertEmpty(int imageIndex,
ImageTypeSpecifier imageType,
int width,
int height,
javax.imageio.metadata.IIOMetadata imageMetadata,
java.util.List<? extends java.awt.image.BufferedImage> thumbnails,
ImageWriteParam param)
Start inserting an empty image in the image output stream.
|
void |
prepareReplacePixels(int imageIndex,
java.awt.Rectangle region)
Start the replacement of pixels within an image in the output
stream.
|
void |
prepareWriteEmpty(javax.imageio.metadata.IIOMetadata streamMetadata,
ImageTypeSpecifier imageType,
int width,
int height,
javax.imageio.metadata.IIOMetadata imageMetadata,
java.util.List<? extends java.awt.image.BufferedImage> thumbnails,
ImageWriteParam param)
Start writing an empty image to the end of the image output
stream.
|
void |
prepareWriteSequence(javax.imageio.metadata.IIOMetadata streamMetadata)
Start the writing of a sequence of images.
|
protected void |
processImageComplete()
Notifies all installed write progress listeners that image
loading has completed by calling their imageComplete methods.
|
protected void |
processImageProgress(float percentageDone)
Notifies all installed write progress listeners that a certain
percentage of the image has been loaded, by calling their
imageProgress methods.
|
protected void |
processImageStarted(int imageIndex)
Notifies all installed write progress listeners, by calling their
imageStarted methods, that image loading has started on the given
image.
|
protected void |
processThumbnailComplete()
Notifies all installed write progress listeners, by calling their
thumbnailComplete methods, that a thumbnail has completed
loading.
|
protected void |
processThumbnailProgress(float percentageDone)
Notifies all installed write progress listeners that a certain
percentage of a thumbnail has been loaded, by calling their
thumbnailProgress methods.
|
protected void |
processThumbnailStarted(int imageIndex,
int thumbnailIndex)
Notifies all installed write progress listeners, by calling their
imageStarted methods, that thumbnail loading has started on the
given thumbnail of the given image.
|
protected void |
processWarningOccurred(int imageIndex,
java.lang.String warning)
Notifies all installed warning listeners, by calling their
warningOccurred methods, that a warning message has been raised.
|
protected void |
processWarningOccurred(int imageIndex,
java.lang.String baseName,
java.lang.String keyword)
Notify all installed warning listeners, by calling their
warningOccurred methods, that a warning message has been raised.
|
protected void |
processWriteAborted()
Notifies all installed write progress listeners that image
loading has been aborted by calling their writeAborted methods.
|
void |
removeAllIIOWriteProgressListeners()
Uninstall all write progress listeners.
|
void |
removeAllIIOWriteWarningListeners()
Uninstall all write warning listeners.
|
void |
removeIIOWriteProgressListener(javax.imageio.event.IIOWriteProgressListener listener)
Uninstall the given write progress listener.
|
void |
removeIIOWriteWarningListener(javax.imageio.event.IIOWriteWarningListener listener)
Uninstall the given write warning listener.
|
void |
removeImage(int imageIndex)
Remove the image at the specified index from the output stream.
|
void |
replaceImageMetadata(int imageIndex,
javax.imageio.metadata.IIOMetadata imageMetadata)
Replace the metadata associated with the image at the given
index.
|
void |
replacePixels(java.awt.image.Raster raster,
ImageWriteParam param)
Replace a region of an image in the output stream with a portion
of the given raster data.
|
void |
replacePixels(java.awt.image.RenderedImage image,
ImageWriteParam param)
Replace a region of an image in the output stream with a portion
of the given rendered image.
|
void |
replaceStreamMetadata(javax.imageio.metadata.IIOMetadata streamMetadata)
Replace the metadata associated with this image stream.
|
void |
reset()
Reset this writer's internal state.
|
void |
setLocale(java.util.Locale locale)
Set the current locale or use the default locale.
|
void |
setOutput(java.lang.Object output)
Set the output destination of the given object.
|
void |
write(IIOImage image)
Write a image data, metadata and thumbnails to the output stream.
|
abstract void |
write(javax.imageio.metadata.IIOMetadata streamMetadata,
IIOImage image,
ImageWriteParam param)
Write an image stream, including thumbnails and metadata to the
output stream.
|
void |
write(java.awt.image.RenderedImage image)
Write a rendered image to the output stream.
|
void |
writeInsert(int imageIndex,
IIOImage image,
ImageWriteParam param)
Insert an image into the output stream.
|
void |
writeToSequence(IIOImage image,
ImageWriteParam param)
Write a sequence of images, including thumbnails and metadata, to
the output stream.
|
protected java.util.Locale[] availableLocales
protected java.util.Locale locale
protected javax.imageio.spi.ImageWriterSpi originatingProvider
protected java.lang.Object output
protected java.util.List<javax.imageio.event.IIOWriteProgressListener> progressListeners
protected java.util.List<javax.imageio.event.IIOWriteWarningListener> warningListeners
protected java.util.List<java.util.Locale> warningLocales
protected ImageWriter(javax.imageio.spi.ImageWriterSpi originatingProvider)
originatingProvider - the provider that is constructing this
image writer, or nullpublic void abort()
protected boolean abortRequested()
public void addIIOWriteProgressListener(javax.imageio.event.IIOWriteProgressListener listener)
listener - a write progress listener or nullpublic void addIIOWriteWarningListener(javax.imageio.event.IIOWriteWarningListener listener)
listener - a write warning listenerpublic boolean canInsertEmpty(int imageIndex) throws java.io.IOException
imageIndex - the frame indexjava.lang.IllegalStateException - if output is nulljava.lang.IndexOutOfBoundsException - if imageIndex is less than
-1 or greater than the last index in the current image listjava.io.IOException - if a write error occurspublic boolean canInsertImage(int imageIndex) throws java.io.IOException
imageIndex - the frame indexjava.lang.IllegalStateException - if output is nulljava.lang.IndexOutOfBoundsException - if imageIndex is less than
-1 or greater than the last index in the current image listjava.io.IOException - if a write error occurspublic boolean canRemoveImage(int imageIndex) throws java.io.IOException
imageIndex - the frame indexjava.lang.IllegalStateException - if output is nulljava.lang.IndexOutOfBoundsException - if imageIndex is less than 0
or greater than the last index in the current image listjava.io.IOException - if a write error occurspublic boolean canReplaceImageMetadata(int imageIndex) throws java.io.IOException
imageIndex - the frame indexjava.lang.IllegalStateException - if output is nulljava.lang.IndexOutOfBoundsException - if imageIndex is less than 0
or greater than the last index in the current image listjava.io.IOException - if a write error occurspublic boolean canReplacePixels(int imageIndex) throws java.io.IOException
imageIndex - the frame indexjava.lang.IllegalStateException - if output is nulljava.lang.IndexOutOfBoundsException - if imageIndex is less than 0
or greater than the last index in the current image listjava.io.IOException - if a write error occurspublic boolean canReplaceStreamMetadata() throws java.io.IOException
java.lang.IllegalStateException - if output is nulljava.io.IOException - if a write error occurspublic boolean canWriteEmpty() throws java.io.IOException
java.lang.IllegalStateException - if output is nulljava.io.IOException - if a write error occurspublic boolean canWriteRasters()
public boolean canWriteSequence()
protected void clearAbortRequest()
public abstract javax.imageio.metadata.IIOMetadata convertImageMetadata(javax.imageio.metadata.IIOMetadata inData, ImageTypeSpecifier imageType, ImageWriteParam param)
convertImageMetadata in interface ImageTranscoderinData - the metadata coming from an image readerimageType - the output image type of the writerparam - the image writing parameters or nulljava.lang.IllegalArgumentException - if either inData or imageType
is nullpublic abstract javax.imageio.metadata.IIOMetadata convertStreamMetadata(javax.imageio.metadata.IIOMetadata inData, ImageWriteParam param)
convertStreamMetadata in interface ImageTranscoderinData - the metadata coming from an input image streamparam - the image writing parameters or nulljava.lang.IllegalArgumentException - if inData is nullpublic void dispose()
public java.util.Locale[] getAvailableLocales()
public abstract javax.imageio.metadata.IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param)
imageType - an image type specifierparam - image writing parameters, or nullpublic abstract javax.imageio.metadata.IIOMetadata getDefaultStreamMetadata(ImageWriteParam param)
param - image writing parameters, or nullpublic ImageWriteParam getDefaultWriteParam()
public java.util.Locale getLocale()
public int getNumThumbnailsSupported(ImageTypeSpecifier imageType, ImageWriteParam param, javax.imageio.metadata.IIOMetadata streamMetadata, javax.imageio.metadata.IIOMetadata imageMetadata)
imageType - an image type specifier, or nullparam - image writing parameters, or nullstreamMetadata - the metadata associated with this stream,
or nullimageMetadata - the metadata associated with this image, or
nullpublic javax.imageio.spi.ImageWriterSpi getOriginatingProvider()
public java.lang.Object getOutput()
public java.awt.Dimension[] getPreferredThumbnailSizes(ImageTypeSpecifier imageType, ImageWriteParam param, javax.imageio.metadata.IIOMetadata streamMetadata, javax.imageio.metadata.IIOMetadata imageMetadata)
imageType - an image type specifier, or nullparam - image writing parameters, or nullstreamMetadata - the metadata associated with this stream,
or nullimageMetadata - the metadata associated with this image, or
nullprotected void processImageComplete()
protected void processImageProgress(float percentageDone)
percentageDone - the percentage of image data that has been
loadedprotected void processImageStarted(int imageIndex)
imageIndex - the frame index of the image that has started
loadingprotected void processThumbnailComplete()
protected void processThumbnailProgress(float percentageDone)
percentageDone - the percentage of thumbnail data that has
been loadedprotected void processThumbnailStarted(int imageIndex, int thumbnailIndex)
imageIndex - the frame index of the image one of who's
thumbnails has started loadingthumbnailIndex - the index of the thumbnail that has started
loadingprotected void processWarningOccurred(int imageIndex, java.lang.String warning)
imageIndex - the index of the image that was being written
when the warning was raisedwarning - the warning messagejava.lang.IllegalArgumentException - if warning is nullprotected void processWarningOccurred(int imageIndex, java.lang.String baseName, java.lang.String keyword)
imageIndex - the index of the image that was being written
when the warning was raisedbaseName - the basename of the resource from which to
retrieve the warning messagekeyword - the keyword used to retrieve the warning from the
resource bundlejava.lang.IllegalArgumentException - if either baseName or keyword
is nulljava.lang.IllegalArgumentException - if no resource bundle is
found using baseNamejava.lang.IllegalArgumentException - if the given keyword produces
no results from the resource bundlejava.lang.IllegalArgumentException - if the retrieved object is
not a Stringprotected void processWriteAborted()
public void removeAllIIOWriteProgressListeners()
public void removeAllIIOWriteWarningListeners()
public void removeIIOWriteProgressListener(javax.imageio.event.IIOWriteProgressListener listener)
listener - the listener to removepublic void removeIIOWriteWarningListener(javax.imageio.event.IIOWriteWarningListener listener)
listener - the listener to removepublic void reset()
public void setLocale(java.util.Locale locale)
locale - the locale to set, or nullpublic void setOutput(java.lang.Object output)
output - the output destination objectjava.lang.IllegalArgumentException - if input is not a valid input
source for this writer and is not an ImageInputStreampublic abstract void write(javax.imageio.metadata.IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param) throws java.io.IOException
streamMetadata - metadata associated with this stream, or
nullimage - an IIOImage containing image data, metadata and
thumbnails to be writtenparam - image writing parameters, or nulljava.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if image contains raster
data but this writer does not support rastersjava.lang.IllegalArgumentException - if image is nulljava.io.IOException - if a write error occurspublic void endInsertEmpty() throws java.io.IOException
java.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if inserting empty
images is not supportedjava.lang.IllegalArgumentException - if a call to
prepareInsertEmpty was not called previous to this method being
called (a sequence of prepareInsertEmpty calls must be terminated
by a call to endInsertEmpty)java.lang.IllegalArgumentException - if prepareWriteEmpty was
called before this method being called (without a terminating
call to endWriteEmpty)java.lang.IllegalArgumentException - if prepareReplacePixels was
called before this method being called (without a terminating
call to endReplacePixels)java.io.IOException - if a write error occurspublic void endReplacePixels() throws java.io.IOException
java.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if replacing pixels is
not supported by this writerjava.lang.IllegalArgumentException - if prepareReplacePixels was
not called before this method being calledjava.io.IOException - if a write error occurspublic void endWriteEmpty() throws java.io.IOException
java.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if writing empty images
is not supportedjava.lang.IllegalArgumentException - if a call to
prepareWriteEmpty was not called previous to this method being
called (a sequence of prepareWriteEmpty calls must be terminated
by a call to endWriteEmpty)java.lang.IllegalArgumentException - if prepareInsertEmpty was
called before this method being called (without a terminating
call to endInsertEmpty)java.lang.IllegalArgumentException - if prepareReplacePixels was
called before this method being called (without a terminating
call to endReplacePixels)java.io.IOException - if a write error occurspublic void endWriteSequence() throws java.io.IOException
java.lang.IllegalStateException - if output is nulljava.lang.IllegalStateException - if prepareWriteSequence has not
been calledjava.lang.UnsupportedOperationException - if writing a sequence of
images is not supportedjava.io.IOException - if a write error occurspublic void prepareInsertEmpty(int imageIndex, ImageTypeSpecifier imageType, int width, int height, javax.imageio.metadata.IIOMetadata imageMetadata, java.util.List<? extends java.awt.image.BufferedImage> thumbnails, ImageWriteParam param) throws java.io.IOException
imageIndex - the image indeximageType - the image type specifierwidth - the image widthheight - the image heightimageMetadata - the image metadata, or nullthumbnails - a list of thumbnails, or nullparam - image write parameters, or nulljava.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if inserting empty
images is not supportedjava.lang.IndexOutOfBoundsException - if imageIndex is less than
-1 or greater than the last index in the current image listjava.lang.IllegalStateException - if a previous call to
prepareInsertEmpty was made (without a terminating call to
endInsertEmpty)java.lang.IllegalStateException - if a previous call to
prepareWriteEmpty was made (without a terminating call to
endWriteEmpty)java.lang.IllegalArgumentException - if imageType is null or
thumbnails contain non-BufferedImage objectsjava.lang.IllegalArgumentException - if either width or height is
less than 1java.io.IOException - if a write error occurspublic void prepareReplacePixels(int imageIndex, java.awt.Rectangle region) throws java.io.IOException
imageIndex - the index of the image in which pixels are
being replacedregion - the rectangle to which to limit pixel replacementjava.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if replacing pixels is
not supportedjava.lang.IndexOutOfBoundsException - if imageIndex is less than 0
or greater than the last index in the current image listjava.lang.IllegalStateException - if a previous call to
prepareReplacePixels was made (without a terminating call to
endReplacePixels)java.lang.IllegalArgumentException - if either region.width or
region.height is less than 1, or if region is nulljava.io.IOException - if a write error occurspublic void prepareWriteEmpty(javax.imageio.metadata.IIOMetadata streamMetadata, ImageTypeSpecifier imageType, int width, int height, javax.imageio.metadata.IIOMetadata imageMetadata, java.util.List<? extends java.awt.image.BufferedImage> thumbnails, ImageWriteParam param) throws java.io.IOException
streamMetadata - metadata associated with the stream, or nullimageType - the image type specifierwidth - the image widthheight - the image heightimageMetadata - the image metadata, or nullthumbnails - a list of thumbnails, or nullparam - image write parameters, or nulljava.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if writing empty images
is not supportedjava.lang.IndexOutOfBoundsException - if imageIndex is less than
-1 or greater than the last index in the current image listjava.lang.IllegalStateException - if a previous call to
prepareInsertEmpty was made (without a terminating call to
endInsertEmpty)java.lang.IllegalStateException - if a previous call to
prepareWriteEmpty was made (without a terminating call to
endWriteEmpty)java.lang.IllegalArgumentException - if imageType is null or
thumbnails contain non-BufferedImage objectsjava.lang.IllegalArgumentException - if either width or height is
less than 1java.io.IOException - if a write error occurspublic void prepareWriteSequence(javax.imageio.metadata.IIOMetadata streamMetadata) throws java.io.IOException
streamMetadata - the stream metadata, or nulljava.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if writing sequences of
images is not supportedjava.io.IOException - if a write error occurspublic void removeImage(int imageIndex) throws java.io.IOException
imageIndex - the frame index from which to remove the imagejava.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if removing this image
is not supportedjava.lang.IndexOutOfBoundsException - if imageIndex is less than 0
or greater than the last index in the current image listjava.io.IOException - if a write error occurspublic void replaceImageMetadata(int imageIndex, javax.imageio.metadata.IIOMetadata imageMetadata) throws java.io.IOException
imageIndex - the index of the image whose metadata should be
replacedimageMetadata - the metadata, or nulljava.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if replacing this
image's metadata is not supportedjava.lang.IndexOutOfBoundsException - if imageIndex is less than 0
or greater than the last index in the current image listjava.io.IOException - if a write error occurspublic void replacePixels(java.awt.image.RenderedImage image, ImageWriteParam param) throws java.io.IOException
image - the rendered image with which to overwrite the image
region in the streamparam - the image writing parametersjava.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if replacing pixels is
not supportedjava.lang.IllegalStateException - if prepareReplacePixels was not
called before this method was calledjava.lang.IllegalArgumentException - if image is null or if param
is null or if the overlap of the source and destination regions
contains no pixels or if the image types differ and no conversion
is possiblejava.io.IOException - if a write error occurspublic void replacePixels(java.awt.image.Raster raster, ImageWriteParam param) throws java.io.IOException
raster - the raster data with which to overwrite the image
region in the streamparam - the image writing parametersjava.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if replacing pixels is
not supportedjava.lang.IllegalStateException - if prepareReplacePixels was not
called before this method was calledjava.lang.UnsupportedOperationException - if raster data is not
supportedjava.lang.IllegalArgumentException - if raster is null or if param
is null or if the overlap of the source and destination regions
contains no pixels or if the image types differ and no conversion
is possiblejava.io.IOException - if a write error occurspublic void replaceStreamMetadata(javax.imageio.metadata.IIOMetadata streamMetadata) throws java.io.IOException
streamMetadata - the stream metadata, or nulljava.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if replacing the stream
metadata is not supportedjava.io.IOException - if a write error occurspublic void write(java.awt.image.RenderedImage image) throws java.io.IOException
image - a rendered image containing image data to be writtenjava.lang.IllegalStateException - if output is nulljava.lang.IllegalArgumentException - if image is nulljava.io.IOException - if a write error occurspublic void write(IIOImage image) throws java.io.IOException
image - image data, metadata and thumbnails to be writtenjava.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if image contains raster
data but this writer does not support rastersjava.lang.IllegalArgumentException - if image is nulljava.io.IOException - if a write error occurspublic void writeInsert(int imageIndex, IIOImage image, ImageWriteParam param) throws java.io.IOException
imageIndex - the frame index at which to insert the imageimage - the image data, metadata and thumbnails to be
insertedparam - image write parameters, or nulljava.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if image insertion is
not supportedjava.lang.IllegalArgumentException - if image is nulljava.lang.IndexOutOfBoundsException - if imageIndex is less than
-1 or greater than the last index in the current image listjava.lang.UnsupportedOperationException - if image contains raster
data but this writer does not support rastersjava.io.IOException - if a write error occurspublic void writeToSequence(IIOImage image, ImageWriteParam param) throws java.io.IOException
streamMetadata - metadata associated with this stream, or
nullimage - an IIOImage containing image data, metadata and
thumbnails to be writtenparam - image writing parameters, or nulljava.lang.IllegalStateException - if output is nulljava.lang.UnsupportedOperationException - if writing sequences of
images is not supportedjava.lang.IllegalArgumentException - if image is nulljava.lang.UnsupportedOperationException - if image contains raster
data but this writer does not support rastersjava.io.IOException - if a write error occurs