|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ProductWriter
An interface that supports writing a complete data product tree and single band rasters.
ProductReader| Method Summary | |
|---|---|
void |
close()
Closes all output streams currently open. |
void |
deleteOutput()
Complete deletes the physical representation of the given product from the file system. |
void |
flush()
Writes all data in memory to the data sink(s) associated with this writer. |
Object |
getOutput()
Retrives the current output destination object. |
ProductWriterPlugIn |
getWriterPlugIn()
Returns the plug-in which created this product writer. |
boolean |
isIncrementalMode()
Returns whether this product writer writes only modified product nodes. |
void |
removeBand(Band band)
Physically deletes a Band in a product writer's output. |
void |
setIncrementalMode(boolean enabled)
Enables resp. |
boolean |
shouldWrite(ProductNode node)
Returns wether the given product node is to be written. |
void |
writeBandRasterData(Band sourceBand,
int sourceOffsetX,
int sourceOffsetY,
int sourceWidth,
int sourceHeight,
ProductData sourceBuffer,
com.bc.ceres.core.ProgressMonitor pm)
Writes raster data from the given in-memory source buffer into the data sink specified by the given source band and region. |
void |
writeProductNodes(Product product,
Object output)
Writes the in-memory representation of a data product. |
| Method Detail |
|---|
ProductWriterPlugIn getWriterPlugIn()
nullObject getOutput()
null if the
setOutput has not been called so far.
void writeProductNodes(Product product,
Object output)
throws IOException
Whether the band data - the actual pixel values - is written out immediately or later when pixels are flushed, is up to the implementation.
product - the in-memory representation of the data productoutput - an object representing a valid output for this writer, might be a ImageInputStream or
other Object to use for future decoding.
IllegalArgumentException - if output is null or it's type is not one of the
supported output sources.
IOException - if an I/O error occurs
void writeBandRasterData(Band sourceBand,
int sourceOffsetX,
int sourceOffsetY,
int sourceWidth,
int sourceHeight,
ProductData sourceBuffer,
com.bc.ceres.core.ProgressMonitor pm)
throws IOException
sourceOffsetX
and sourceOffsetY of the source region. These parameters are an offset within the band's raster data
and not an offset within the source buffer.sourceWidth * sourceHeight. The pixel values to be writte are considered to be stored in
line-by-line order, so the raster X co-ordinate varies faster than the Y.
sourceOffsetX,
sourceOffsetY, sourceWidth and sourceHeight parameters is given in the
source band's raster co-ordinates. These co-ordinates are identical with the destination raster co-ordinates
since product writers do not support spectral or spatial subsets.
sourceBand - the source band which identifies the data sink to which to write the sample valuessourceOffsetX - the X-offset in the band's raster co-ordinatessourceOffsetY - the Y-offset in the band's raster co-ordinatessourceWidth - the width of region to be written given in the band's raster co-ordinatessourceHeight - the height of region to be written given in the band's raster co-ordinatessourceBuffer - the source buffer which provides the sample values to be writtenpm - a monitor to inform the user about progress
IOException - if an I/O error occurs
IllegalArgumentException - if the number of elements source buffer not equals sourceWidth *
sourceHeight or the source region is out of the band's rasterRasterDataNode.getRasterWidth(),
RasterDataNode.getRasterHeight()
void flush()
throws IOException
IOException - if an I/O error occurs
void close()
throws IOException
flush before
performing the actual close-operation.
IOException - if an I/O error occursboolean shouldWrite(ProductNode node)
node - the product node
true if soboolean isIncrementalMode()
true if sovoid setIncrementalMode(boolean enabled)
enabled - enables or disables progress listening.
void deleteOutput()
throws IOException
IOException - if an I/O error occursvoid removeBand(Band band)
Band in a product writer's output.
band - The band to delete.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||