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
AnAbstractGridCoverageWriter
is the base class for allGridCoverageWriter
implementations 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 Object
destination
the destination object where we will do the writingprotected Hints
hints
Hints to be used for the writing process.protected ImageOutputStream
outStream
The destinationImageOutputStream
.
-
Constructor Summary
Constructors Constructor Description AbstractGridCoverageWriter()
Default constructor for anAbstractGridCoverageWriter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Releases resources held by thisAbstractGridCoverageWriter
.protected void
finalize()
Forcing the disposal of thisAbstractGridCoverageWriter
which may keep a reference to an openImageOutputStream
Object
getDestination()
(non-Javadoc)String[]
getMetadataNames()
Implementation of getMetadataNames.void
setCurrentSubname(String name)
Set the name for the next grid coverage to write within the output destination.void
setMetadataValue(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:
dispose
in interfaceGridCoverageWriter
-
getDestination
public Object getDestination()
(non-Javadoc)- Specified by:
getDestination
in 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:
getMetadataNames
in interfaceGridCoverageWriter
- Returns:
- null
- See Also:
GridCoverageWriter.getMetadataNames()
-
setCurrentSubname
public void setCurrentSubname(String name) throws IOException
Description copied from interface:GridCoverageWriter
Set the name for the next grid coverage to write within the output destination. The subname can been fetch later at reading time.- Specified by:
setCurrentSubname
in 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:GridCoverageWriter
Sets the metadata value for a given metadata name.- Specified by:
setMetadataValue
in 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 Throwable
Forcing the disposal of thisAbstractGridCoverageWriter
which may keep a reference to an openImageOutputStream
-
-