Enum ReadType

  • All Implemented Interfaces:
    Serializable, Comparable<ReadType>

    public enum ReadType
    extends Enum<ReadType>
    This enum can be used to distinguish between differet read methods, namely, JAI ImageRead based and Java2D direct read via ImageReader.
    Author:
    Simone Giannecchini, GeoSolutions SAS, Stefan Alfons Krueger (alfonx), Wikisquare.de : Support for jar:file:foo.jar/bar.properties URLs
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static ReadType getDefault()
      Default ReadType enumeration.
      abstract RenderedImage read​(ImageReadParam readParameters, int imageIndex, URL granuleUrl, Rectangle rasterDimensions, ImageReader reader, Hints hints, boolean closeElements)
      Load the raster data from the underlying source with the specified read type.
      static ReadType valueOf​(String name)
      Returns the enum constant of this type with the specified name.
      static ReadType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • DIRECT_READ

        public static final ReadType DIRECT_READ
      • JAI_IMAGEREAD

        public static final ReadType JAI_IMAGEREAD
      • UNSPECIFIED

        public static final ReadType UNSPECIFIED
    • Method Detail

      • values

        public static ReadType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ReadType c : ReadType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ReadType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getDefault

        public static ReadType getDefault()
        Default ReadType enumeration.

        We use the JAI ImageRead as the default type so that we can be sure that we can read very large mosaics with deferred loading.

        Returns:
        the default ReadType.
      • read

        public abstract RenderedImage read​(ImageReadParam readParameters,
                                           int imageIndex,
                                           URL granuleUrl,
                                           Rectangle rasterDimensions,
                                           ImageReader reader,
                                           Hints hints,
                                           boolean closeElements)
        Load the raster data from the underlying source with the specified read type.
        Parameters:
        hints - Hints to control the read process
        Returns:
        a RenderedImage instance that matches the provided request parameters as close as possible.
        Throws:
        IOException - in case something bad occurs during the decoding process.