Class ThumbsDBImageReader

java.lang.Object
javax.imageio.ImageReader
com.twelvemonkeys.imageio.ImageReaderBase
com.twelvemonkeys.imageio.plugins.thumbsdb.ThumbsDBImageReader

public final class ThumbsDBImageReader extends com.twelvemonkeys.imageio.ImageReaderBase
ThumbsDBImageReader
Version:
$Id: ThumbsDBImageReader.java,v 1.0 22.jan.2007 18:49:38 haku Exp$
Author:
Harald Kuhr, last modified by $Author: haku$
See Also:
  • Constructor Details

    • ThumbsDBImageReader

      public ThumbsDBImageReader()
    • ThumbsDBImageReader

      protected ThumbsDBImageReader(ThumbsDBImageReaderSpi pProvider)
  • Method Details

    • resetMembers

      protected void resetMembers()
      Specified by:
      resetMembers in class com.twelvemonkeys.imageio.ImageReaderBase
    • dispose

      public void dispose()
      Overrides:
      dispose in class com.twelvemonkeys.imageio.ImageReaderBase
    • isLoadEagerly

      public boolean isLoadEagerly()
    • setLoadEagerly

      public void setLoadEagerly(boolean pLoadEagerly)
      Instructs the reader wether it should read and cache alle thumbnails in sequence, during the first read operation.

      This is useful mainly if you need to read all the thumbnails, and you need them in random order, as it requires less repositioning in the underlying stream.

      Parameters:
      pLoadEagerly - true if the reader should read all thumbs on first read
    • read

      public BufferedImage read(int pIndex, ImageReadParam pParam) throws IOException
      Reads the image data from the given input stream, and returns it as a BufferedImage.
      Specified by:
      read in class ImageReader
      Parameters:
      pIndex - the index of the image to read
      pParam - additional parameters used while decoding, may be null, in which case defaults will be used
      Returns:
      a BufferedImage
      Throws:
      IndexOutOfBoundsException - if pIndex is out of bounds
      IllegalStateException - if the input source has not been set
      IOException - if an error occurs during reading
    • read

      public BufferedImage read(String pName, ImageReadParam pParam) throws IOException
      Reads the image data from the given input stream, and returns it as a BufferedImage.
      Parameters:
      pName - the name of the image to read
      pParam - additional parameters used while decoding, may be null, in which case defaults will be used
      Returns:
      a BufferedImage
      Throws:
      FileNotFoundException - if the given file name is not found in the "Catalog" entry of the CompoundDocument
      IllegalStateException - if the input source has not been set
      IOException - if an error occurs during reading
    • abort

      public void abort()
      Overrides:
      abort in class ImageReader
    • setInput

      public void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)
      Overrides:
      setInput in class com.twelvemonkeys.imageio.ImageReaderBase
    • getNumImages

      public int getNumImages(boolean allowSearch) throws IOException
      Overrides:
      getNumImages in class com.twelvemonkeys.imageio.ImageReaderBase
      Throws:
      IOException
    • getWidth

      public int getWidth(int pIndex) throws IOException
      Specified by:
      getWidth in class ImageReader
      Throws:
      IOException
    • getHeight

      public int getHeight(int pIndex) throws IOException
      Specified by:
      getHeight in class ImageReader
      Throws:
      IOException
    • getImageTypes

      public Iterator<ImageTypeSpecifier> getImageTypes(int pIndex) throws IOException
      Specified by:
      getImageTypes in class ImageReader
      Throws:
      IOException
    • isPresent

      public boolean isPresent(String pFileName)
    • main

      public static void main(String[] pArgs) throws IOException
      Throws:
      IOException