API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.imageio. ImageReader View Source
Author(s)
Since
Version
0.5
Serial
Hierarchy
 Object
      ImageReader
Implements
Subclasses
Description
publicabstract abstract class ImageReader
  An abstract superclass for parsing and decoding of images.
Constructors
protected ImageReader (ImageReaderSpi originatingProvider)
  Constructs an ImageReader and sets its originatingProvider field to the supplied value.
Methods
Hide/Show inherited methods
publicsynchronized void abort ()
  Requests that any current read operation be aborted.
protectedsynchronized boolean abortRequested ()
  Returns true if a request to abort the current read operation has been made since the reader was instantiated or clearAbortRequest was called.
public void addIIOReadProgressListener (IIOReadProgressListener listener)
  Adds an IIOReadProgressListener to the list of registered progress listeners.
public void addIIOReadUpdateListener (IIOReadUpdateListener listener)
  Adds an IIOReadUpdateListener to the list of registered update listeners.
public void addIIOReadWarningListener (IIOReadWarningListener listener)
  Adds an IIOReadWarningListener to the list of registered warning listeners.
pack-privatestatic List addToList (List l, Object elt)
public boolean canReadRaster ()
  Returns true if this plug-in supports reading just a Raster of pixel data.
protectedstatic void checkReadParamBandSettings (ImageReadParam param, int numSrcBands, int numDstBands)
  A utility method that may be used by readers to test the validity of the source and destination band settings of an ImageReadParam.
protectedsynchronized void clearAbortRequest ()
  Clears any previous abort request.
protectedstatic void computeRegions (ImageReadParam param, int srcWidth, int srcHeight, BufferedImage image, Rectangle srcRegion, Rectangle destRegion)
  Computes the source region of interest and the destination region of interest, taking the width and height of the source image, an optional destination image, and an optional ImageReadParam into account.
public void dispose ()
  Allows any resources held by this object to be released.
public float getAspectRatio (int imageIndex) throws IOException
  Returns the aspect ratio of the given image (that is, its width divided by its height) as a float.
public Locale getAvailableLocales ()
  Returns an array of Locales that may be used to localize warning listeners and compression settings.
public ImageReadParam getDefaultReadParam ()
  Returns a default ImageReadParam object appropriate for this format.
protectedstatic BufferedImage getDestination (ImageReadParam param, Iterator<ImageTypeSpecifier> imageTypes, int width, int height) throws IIOException
  Returns the BufferedImage to which decoded pixel data should be written.
public String getFormatName () throws IOException
  Returns a String identifying the format of the input source.
publicabstract int getHeight (int imageIndex) throws IOException
  Returns the height in pixels of the given image within the input source.
publicabstract IIOMetadata getImageMetadata (int imageIndex) throws IOException
  Returns an IIOMetadata object containing metadata associated with the given image, or null if the reader does not support reading metadata, is set to ignore metadata, or if no metadata is available.
public IIOMetadata getImageMetadata (int imageIndex, String formatName, Set<String> nodeNames) throws IOException
  Returns an IIOMetadata object representing the metadata associated with the given image, or null if the reader does not support reading metadata or none is available.
publicabstract Iterator<ImageTypeSpecifier> getImageTypes (int imageIndex) throws IOException
  Returns an Iterator containing possible image types to which the given image may be decoded, in the form of ImageTypeSpecifierss.
public Object getInput ()
  Returns the ImageInputStream or other Object previously set as the input source.
public Locale getLocale ()
  Returns the currently set Locale, or null if none has been set.
public int getMinIndex ()
  Returns the lowest valid index for reading an image, thumbnail, or image metadata.
publicabstract int getNumImages (boolean allowSearch) throws IOException
  Returns the number of images, not including thumbnails, available from the current input source.
public int getNumThumbnails (int imageIndex) throws IOException
  Returns the number of thumbnail preview images associated with the given image.
public ImageReaderSpi getOriginatingProvider ()
  Returns the ImageReaderSpi that was passed in on the constructor.
public ImageTypeSpecifier getRawImageType (int imageIndex) throws IOException
  Returns an ImageTypeSpecifier indicating the SampleModel and ColorModel which most closely represents the "raw" internal format of the image.
protectedstatic Rectangle getSourceRegion (ImageReadParam param, int srcWidth, int srcHeight)
  A utility method that may be used by readers to compute the region of the source image that should be read, taking into account any source region and subsampling offset settings in the supplied ImageReadParam.
publicabstract IIOMetadata getStreamMetadata () throws IOException
  Returns an IIOMetadata object representing the metadata associated with the input source as a whole (i.e., not associated with any particular image), or null if the reader does not support reading metadata, is set to ignore metadata, or if no metadata is available.
public IIOMetadata getStreamMetadata (String formatName, Set<String> nodeNames) throws IOException
  Returns an IIOMetadata object representing the metadata associated with the input source as a whole (i.e., not associated with any particular image).
public int getThumbnailHeight (int imageIndex, int thumbnailIndex) throws IOException
  Returns the height of the thumbnail preview image indexed by thumbnailIndex, associated with the image indexed by ImageIndex.
public int getThumbnailWidth (int imageIndex, int thumbnailIndex) throws IOException
  Returns the width of the thumbnail preview image indexed by thumbnailIndex, associated with the image indexed by ImageIndex.
public int getTileGridXOffset (int imageIndex) throws IOException
  Returns the X coordinate of the upper-left corner of tile (0, 0) in the given image.
public int getTileGridYOffset (int imageIndex) throws IOException
  Returns the Y coordinate of the upper-left corner of tile (0, 0) in the given image.
public int getTileHeight (int imageIndex) throws IOException
  Returns the height of a tile in the given image.
public int getTileWidth (int imageIndex) throws IOException
  Returns the width of a tile in the given image.
publicabstract int getWidth (int imageIndex) throws IOException
  Returns the width in pixels of the given image within the input source.
public boolean hasThumbnails (int imageIndex) throws IOException
  Returns true if the given image has thumbnail preview images associated with it.
public boolean isIgnoringMetadata ()
  Returns true if the current input source has been marked as allowing metadata to be ignored by passing true as the ignoreMetadata argument to the setInput method.
public boolean isImageTiled (int imageIndex) throws IOException
  Returns true if the image is organized into tiles, that is, equal-sized non-overlapping rectangles.
public boolean isRandomAccessEasy (int imageIndex) throws IOException
  Returns true if the storage format of the given image places no inherent impediment on random access to pixels.
public boolean isSeekForwardOnly ()
  Returns true if the current input source has been marked as seek forward only by passing true as the seekForwardOnly argument to the setInput method.
protected void processImageComplete ()
  Broadcasts the completion of an image read to all registered IIOReadProgressListeners by calling their imageComplete method.
protected void processImageProgress (float percentageDone)
  Broadcasts the current percentage of image completion to all registered IIOReadProgressListeners by calling their imageProgress method.
protected void processImageStarted (int imageIndex)
  Broadcasts the start of an image read to all registered IIOReadProgressListeners by calling their imageStarted method.
protected void processImageUpdate (BufferedImage theImage, int minX, int minY, int width, int height, int periodX, int periodY, int[] bands)
  Broadcasts the update of a set of samples to all registered IIOReadUpdateListeners by calling their imageUpdate method.
protected void processPassComplete (BufferedImage theImage)
  Broadcasts the end of a progressive pass to all registered IIOReadUpdateListeners by calling their passComplete method.
protected void processPassStarted (BufferedImage theImage, int pass, int minPass, int maxPass, int minX, int minY, int periodX, int periodY, int[] bands)
  Broadcasts the beginning of a progressive pass to all registered IIOReadUpdateListeners by calling their passStarted method.
protected void processReadAborted ()
  Broadcasts that the read has been aborted to all registered IIOReadProgressListeners by calling their readAborted method.
protected void processSequenceComplete ()
  Broadcasts the completion of an sequence of image reads to all registered IIOReadProgressListeners by calling their sequenceComplete method.
protected void processSequenceStarted (int minIndex)
  Broadcasts the start of an sequence of image reads to all registered IIOReadProgressListeners by calling their sequenceStarted method.
protected void processThumbnailComplete ()
  Broadcasts the completion of a thumbnail read to all registered IIOReadProgressListeners by calling their thumbnailComplete method.
protected void processThumbnailPassComplete (BufferedImage theThumbnail)
  Broadcasts the end of a thumbnail progressive pass to all registered IIOReadUpdateListeners by calling their thumbnailPassComplete method.
protected void processThumbnailPassStarted (BufferedImage theThumbnail, int pass, int minPass, int maxPass, int minX, int minY, int periodX, int periodY, int[] bands)
  Broadcasts the beginning of a thumbnail progressive pass to all registered IIOReadUpdateListeners by calling their thumbnailPassStarted method.
protected void processThumbnailProgress (float percentageDone)
  Broadcasts the current percentage of thumbnail completion to all registered IIOReadProgressListeners by calling their thumbnailProgress method.
protected void processThumbnailStarted (int imageIndex, int thumbnailIndex)
  Broadcasts the start of a thumbnail read to all registered IIOReadProgressListeners by calling their thumbnailStarted method.
protected void processThumbnailUpdate (BufferedImage theThumbnail, int minX, int minY, int width, int height, int periodX, int periodY, int[] bands)
  Broadcasts the update of a set of samples in a thumbnail image to all registered IIOReadUpdateListeners by calling their thumbnailUpdate method.
protected void processWarningOccurred (String warning)
  Broadcasts a warning message to all registered IIOReadWarningListeners by calling their warningOccurred method.
protected void processWarningOccurred (String baseName, String keyword)
  Broadcasts a localized warning message to all registered IIOReadWarningListeners by calling their warningOccurred method with a string taken from a ResourceBundle.
public BufferedImage read (int imageIndex) throws IOException
  Reads the image indexed by imageIndex and returns it as a complete BufferedImage, using a default ImageReadParam.
publicabstract BufferedImage read (int imageIndex, ImageReadParam param) throws IOException
  Reads the image indexed by imageIndex and returns it as a complete BufferedImage, using a supplied ImageReadParam.
public IIOImage readAll (int imageIndex, ImageReadParam param) throws IOException
  Reads the image indexed by imageIndex and returns an IIOImage containing the image, thumbnails, and associated image metadata, using a supplied ImageReadParam.
public Iterator<IIOImage> readAll (Iterator<ImageReadParam> params) throws IOException
  Returns an Iterator containing all the images, thumbnails, and metadata, starting at the index given by getMinIndex, from the input source in the form of IIOImage objects.
public RenderedImage readAsRenderedImage (int imageIndex, ImageReadParam param) throws IOException
  Returns a RenderedImage object that contains the contents of the image indexed by imageIndex.
public boolean readerSupportsThumbnails ()
  Returns true if the image format understood by this reader supports thumbnail preview images associated with it.
public Raster readRaster (int imageIndex, ImageReadParam param) throws IOException
  Returns a new Raster object containing the raw pixel data from the image stream, without any color conversion applied.
public BufferedImage readThumbnail (int imageIndex, int thumbnailIndex) throws IOException
  Returns the thumbnail preview image indexed by thumbnailIndex, associated with the image indexed by ImageIndex as a BufferedImage.
public BufferedImage readTile (int imageIndex, int tileX, int tileY) throws IOException
  Reads the tile indicated by the tileX and tileY arguments, returning it as a BufferedImage.
public Raster readTileRaster (int imageIndex, int tileX, int tileY) throws IOException
  Returns a new Raster object containing the raw pixel data from the tile, without any color conversion applied.
public void removeAllIIOReadProgressListeners ()
  Removes all currently registered IIOReadProgressListener objects.
public void removeAllIIOReadUpdateListeners ()
  Removes all currently registered IIOReadUpdateListener objects.
public void removeAllIIOReadWarningListeners ()
  Removes all currently registered IIOReadWarningListener objects.
pack-privatestatic List removeFromList (List l, Object elt)
public void removeIIOReadProgressListener (IIOReadProgressListener listener)
  Removes an IIOReadProgressListener from the list of registered progress listeners.
public void removeIIOReadUpdateListener (IIOReadUpdateListener listener)
  Removes an IIOReadUpdateListener from the list of registered update listeners.
public void removeIIOReadWarningListener (IIOReadWarningListener listener)
  Removes an IIOReadWarningListener from the list of registered error listeners.
public void reset ()
  Restores the ImageReader to its initial state.
public void setInput (Object input)
  Sets the input source to use to the given ImageInputStream or other Object.
public void setInput (Object input, boolean seekForwardOnly)
  Sets the input source to use to the given ImageInputStream or other Object.
public void setInput (Object input, boolean seekForwardOnly, boolean ignoreMetadata)
  Sets the input source to use to the given ImageInputStream or other Object.
public void setLocale (Locale locale)
  Sets the current Locale of this ImageReader to the given value.
Fields
Hide/Show inherited fields
protected Locale availableLocales
An array of Locales which may be used to localize warning messages, or null if localization is not supported.
protected boolean ignoreMetadata
  true if the current input source has been marked as allowing metadata to be ignored by setInput.
protected Object input
  The ImageInputStream or other Object by setInput and retrieved by getInput.
protected Locale locale
The current Locale to be used for localization, or null if none has been set.
protected int minIndex
  The smallest valid index for reading, initially 0.
protected ImageReaderSpi originatingProvider
  The ImageReaderSpi that instantiated this object, or null if its identity is not known or none exists.
protected List<IIOReadProgressListener> progressListeners
A List of currently registered IIOReadProgressListeners, initialized by default to null, which is synonymous with an empty List.
protected boolean seekForwardOnly
  true if the current input source has been marked as allowing only forward seeking by setInput.
protected List<IIOReadUpdateListener> updateListeners
A List of currently registered IIOReadUpdateListeners, initialized by default to null, which is synonymous with an empty List.
protected List<IIOReadWarningListener> warningListeners
A List of currently registered IIOReadWarningListeners, initialized by default to null, which is synonymous with an empty List.
protected List<Locale> warningLocales
A List of the Locales associated with each currently registered IIOReadWarningListener, initialized by default to null, which is synonymous with an empty List.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar