Package org.geotools.coverage.grid.io
Class AbstractGridCoverageWriter
- Object
-
- AbstractGridCoverageWriter
-
- All Implemented Interfaces:
GridCoverageWriter
- Direct Known Subclasses:
ArcGridWriter,GeoTiffWriter,GrassCoverageWriter,WorldImageWriter
public abstract class AbstractGridCoverageWriter extends Object implements GridCoverageWriter
AnAbstractGridCoverageWriteris the base class for allGridCoverageWriterimplementations in GeoTools toolkit.We expect it to become the place where to move functionalities common to all
GridCoverageWriter.- Since:
- 2.3.x
- Author:
- Simone Giannecchini
-
-
Field Summary
Fields Modifier and Type Field Description protected Objectdestinationthe destination object where we will do the writingprotected HintshintsHints to be used for the writing process.protected ImageOutputStreamoutStreamThe destinationImageOutputStream.
-
Constructor Summary
Constructors Constructor Description AbstractGridCoverageWriter()Default constructor for anAbstractGridCoverageWriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Releases resources held by thisAbstractGridCoverageWriter.protected voidfinalize()Forcing the disposal of thisAbstractGridCoverageWriterwhich may keep a reference to an openImageOutputStreamObjectgetDestination()(non-Javadoc)String[]getMetadataNames()Implementation of getMetadataNames.voidsetCurrentSubname(String name)Set the name for the next grid coverage to write within the output destination.voidsetMetadataValue(String name, String value)Sets the metadata value for a given metadata name.-
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface GridCoverageWriter
getFormat, write
-
-
-
-
Field Detail
-
destination
protected Object destination
the destination object where we will do the writing
-
hints
protected Hints hints
Hints to be used for the writing process.
-
outStream
protected ImageOutputStream outStream
The destinationImageOutputStream.
-
-
Constructor Detail
-
AbstractGridCoverageWriter
public AbstractGridCoverageWriter()
Default constructor for anAbstractGridCoverageWriter.
-
-
Method Detail
-
dispose
public void dispose()
Releases resources held by thisAbstractGridCoverageWriter.- Specified by:
disposein interfaceGridCoverageWriter
-
getDestination
public Object getDestination()
(non-Javadoc)- Specified by:
getDestinationin interfaceGridCoverageWriter- See Also:
GridCoverageWriter.getDestination()
-
getMetadataNames
public String[] getMetadataNames()
Implementation of getMetadataNames. Currently unimplemented because it has not been specified where to retrieve the metadata- Specified by:
getMetadataNamesin interfaceGridCoverageWriter- Returns:
- null
- See Also:
GridCoverageWriter.getMetadataNames()
-
setCurrentSubname
public void setCurrentSubname(String name) throws IOException
Description copied from interface:GridCoverageWriterSet the name for the next grid coverage to write within the output destination. The subname can been fetch later at reading time.- Specified by:
setCurrentSubnamein interfaceGridCoverageWriter- Throws:
IOException- if an error occurs during writing.- See Also:
GridCoverageWriter.setCurrentSubname(java.lang.String)
-
setMetadataValue
public void setMetadataValue(String name, String value) throws IOException
Description copied from interface:GridCoverageWriterSets the metadata value for a given metadata name.- Specified by:
setMetadataValuein interfaceGridCoverageWriter- Parameters:
name- Metadata keyword for which to set the metadata.value- The metadata value for the given metadata name.- Throws:
IOException- if an error occurs during writing.- See Also:
GridCoverageWriter.setMetadataValue(java.lang.String, java.lang.String)
-
finalize
protected void finalize() throws ThrowableForcing the disposal of thisAbstractGridCoverageWriterwhich may keep a reference to an openImageOutputStream
-
-