org.deegree.coverage.raster.io.imageio
Class IIORasterDataReader

java.lang.Object
  extended by org.deegree.coverage.raster.io.imageio.IIORasterDataReader
All Implemented Interfaces:
RasterDataReader

public class IIORasterDataReader
extends java.lang.Object
implements RasterDataReader

Version:
$Revision: 24731 $, $Date: 2010-06-07 20:37:18 +0200 (Mo, 07. Jun 2010) $
Author:
Oliver Tonnhofer, last edited by: $Author: mschneider $

Constructor Summary
IIORasterDataReader(java.io.File file, RasterIOOptions options)
          Create a IIORasterDataReader for given file
IIORasterDataReader(java.io.InputStream stream, RasterIOOptions options)
          Create a IIORasterDataReader for given stream
 
Method Summary
 void close()
          Removes the internal references to the loaded raster to allow garbage collection of the raster.
 void dispose()
           
protected  java.io.File file()
          needed by the raster reader,
 int getColumns()
          Returns the height of the raster associated with the reader
protected  javax.imageio.metadata.IIOMetadata getMetaData()
           
 RasterDataInfo getRasterDataInfo()
           
 boolean getReadTiles()
           
 int getRows()
          Returns the height of the raster associated with the reader
 ByteBufferRasterData read()
          Reads data and returns a new RasterData object
 BufferResult read(RasterRect rect, java.nio.ByteBuffer resultBuffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IIORasterDataReader

public IIORasterDataReader(java.io.File file,
                           RasterIOOptions options)
Create a IIORasterDataReader for given file

Parameters:
file - file to read
options - with values.

IIORasterDataReader

public IIORasterDataReader(java.io.InputStream stream,
                           RasterIOOptions options)
Create a IIORasterDataReader for given stream

Parameters:
stream - stream to read
options - with values
Method Detail

read

public ByteBufferRasterData read()
Reads data and returns a new RasterData object

Specified by:
read in interface RasterDataReader
Returns:
new RasterData

getColumns

public int getColumns()
Returns the height of the raster associated with the reader

Returns:
raster height

getRows

public int getRows()
Returns the height of the raster associated with the reader

Returns:
raster height

getMetaData

protected javax.imageio.metadata.IIOMetadata getMetaData()
Returns:
the raw metadata of the raster

getRasterDataInfo

public RasterDataInfo getRasterDataInfo()
Returns:
the raster data info object describing the data to be read.

close

public void close()
Removes the internal references to the loaded raster to allow garbage collection of the raster.

Specified by:
close in interface RasterDataReader

file

protected java.io.File file()
needed by the raster reader,

Returns:
will return the file if any.

read

public BufferResult read(RasterRect rect,
                         java.nio.ByteBuffer resultBuffer)
Parameters:
rect -
resultBuffer -
Returns:
the buffer result containing the result buffer (instantiated if the given one was null) and the rect it is valid for.

getReadTiles

public boolean getReadTiles()
Returns:
true if random access is easy for the image io reader.

dispose

public void dispose()


Copyright © 2011. All Rights Reserved.