Class WBMPImageReader


  • public class WBMPImageReader
    extends javax.imageio.ImageReader
    This class is the Java Image IO plugin reader for WBMP images. It may subsample the image, clip the image, and shift the decoded image origin if the proper decoding parameter are set in the provided WBMPImageReadParam.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean gotHeader
      Indicates whether the header is read.
      private int height
      The original image height.
      private javax.imageio.stream.ImageInputStream iis
      The input stream where reads from
      private long imageDataOffset
      The stream position where the image data starts.
      private WBMPMetadata metadata  
      private int wbmpType  
      private int width
      The original image width.
      • Fields inherited from class javax.imageio.ImageReader

        availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales
    • Constructor Summary

      Constructors 
      Constructor Description
      WBMPImageReader​(javax.imageio.spi.ImageReaderSpi originator)
      Constructs WBMPImageReader from the provided ImageReaderSpi.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canReadRaster()  
      private void checkIndex​(int imageIndex)  
      javax.imageio.ImageReadParam getDefaultReadParam()  
      int getHeight​(int imageIndex)  
      javax.imageio.metadata.IIOMetadata getImageMetadata​(int imageIndex)  
      java.util.Iterator getImageTypes​(int imageIndex)  
      int getNumImages​(boolean allowSearch)
      Overrides the method defined in the superclass.
      javax.imageio.metadata.IIOMetadata getStreamMetadata()  
      int getWidth​(int imageIndex)  
      boolean isRandomAccessEasy​(int imageIndex)  
      (package private) boolean isValidWbmpType​(int type)  
      java.awt.image.BufferedImage read​(int imageIndex, javax.imageio.ImageReadParam param)  
      void readHeader()  
      java.awt.image.Raster readRaster​(int imageIndex, javax.imageio.ImageReadParam param)  
      void reset()  
      void setInput​(java.lang.Object input, boolean seekForwardOnly, boolean ignoreMetadata)
      Overrides the method defined in the superclass.
      • Methods inherited from class javax.imageio.ImageReader

        abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, checkReadParamBandSettings, clearAbortRequest, computeRegions, dispose, getAspectRatio, getAvailableLocales, getDestination, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getRawImageType, getSourceRegion, getStreamMetadata, getThumbnailHeight, getThumbnailWidth, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, hasThumbnails, isIgnoringMetadata, isImageTiled, isSeekForwardOnly, processImageComplete, processImageProgress, processImageStarted, processImageUpdate, processPassComplete, processPassStarted, processReadAborted, processSequenceComplete, processSequenceStarted, processThumbnailComplete, processThumbnailPassComplete, processThumbnailPassStarted, processThumbnailProgress, processThumbnailStarted, processThumbnailUpdate, processWarningOccurred, processWarningOccurred, read, readAll, readAll, readAsRenderedImage, readerSupportsThumbnails, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, setInput, setInput, setLocale
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • iis

        private javax.imageio.stream.ImageInputStream iis
        The input stream where reads from
      • gotHeader

        private boolean gotHeader
        Indicates whether the header is read.
      • imageDataOffset

        private long imageDataOffset
        The stream position where the image data starts.
      • width

        private int width
        The original image width.
      • height

        private int height
        The original image height.
      • wbmpType

        private int wbmpType
    • Constructor Detail

      • WBMPImageReader

        public WBMPImageReader​(javax.imageio.spi.ImageReaderSpi originator)
        Constructs WBMPImageReader from the provided ImageReaderSpi.
    • Method Detail

      • setInput

        public void setInput​(java.lang.Object input,
                             boolean seekForwardOnly,
                             boolean ignoreMetadata)
        Overrides the method defined in the superclass.
        Overrides:
        setInput in class javax.imageio.ImageReader
      • getNumImages

        public int getNumImages​(boolean allowSearch)
                         throws java.io.IOException
        Overrides the method defined in the superclass.
        Specified by:
        getNumImages in class javax.imageio.ImageReader
        Throws:
        java.io.IOException
      • getWidth

        public int getWidth​(int imageIndex)
                     throws java.io.IOException
        Specified by:
        getWidth in class javax.imageio.ImageReader
        Throws:
        java.io.IOException
      • getHeight

        public int getHeight​(int imageIndex)
                      throws java.io.IOException
        Specified by:
        getHeight in class javax.imageio.ImageReader
        Throws:
        java.io.IOException
      • isRandomAccessEasy

        public boolean isRandomAccessEasy​(int imageIndex)
                                   throws java.io.IOException
        Overrides:
        isRandomAccessEasy in class javax.imageio.ImageReader
        Throws:
        java.io.IOException
      • checkIndex

        private void checkIndex​(int imageIndex)
      • readHeader

        public void readHeader()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • getImageTypes

        public java.util.Iterator getImageTypes​(int imageIndex)
                                         throws java.io.IOException
        Specified by:
        getImageTypes in class javax.imageio.ImageReader
        Throws:
        java.io.IOException
      • getDefaultReadParam

        public javax.imageio.ImageReadParam getDefaultReadParam()
        Overrides:
        getDefaultReadParam in class javax.imageio.ImageReader
      • getImageMetadata

        public javax.imageio.metadata.IIOMetadata getImageMetadata​(int imageIndex)
                                                            throws java.io.IOException
        Specified by:
        getImageMetadata in class javax.imageio.ImageReader
        Throws:
        java.io.IOException
      • getStreamMetadata

        public javax.imageio.metadata.IIOMetadata getStreamMetadata()
                                                             throws java.io.IOException
        Specified by:
        getStreamMetadata in class javax.imageio.ImageReader
        Throws:
        java.io.IOException
      • read

        public java.awt.image.BufferedImage read​(int imageIndex,
                                                 javax.imageio.ImageReadParam param)
                                          throws java.io.IOException
        Specified by:
        read in class javax.imageio.ImageReader
        Throws:
        java.io.IOException
      • canReadRaster

        public boolean canReadRaster()
        Overrides:
        canReadRaster in class javax.imageio.ImageReader
      • readRaster

        public java.awt.image.Raster readRaster​(int imageIndex,
                                                javax.imageio.ImageReadParam param)
                                         throws java.io.IOException
        Overrides:
        readRaster in class javax.imageio.ImageReader
        Throws:
        java.io.IOException
      • reset

        public void reset()
        Overrides:
        reset in class javax.imageio.ImageReader
      • isValidWbmpType

        boolean isValidWbmpType​(int type)