Package org.geotools.coverage.io
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
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DIRECT_READJAI_IMAGEREADUNSPECIFIED
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ReadTypegetDefault()DefaultReadTypeenumeration.abstract RenderedImageread(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 ReadTypevalueOf(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.
-
-
-
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 nameNullPointerException- if the argument is null
-
getDefault
public static ReadType getDefault()
DefaultReadTypeenumeration.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-Hintsto control the read process- Returns:
- a
RenderedImageinstance that matches the provided request parameters as close as possible. - Throws:
IOException- in case something bad occurs during the decoding process.
-
-