public abstract class AbstractDataRasterWriter extends java.lang.Object implements DataRasterWriter
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
mimeTypes |
protected java.lang.String[] |
suffixes |
Constructor and Description |
---|
AbstractDataRasterWriter()
Default constructor
|
AbstractDataRasterWriter(java.lang.String[] mimeTypes,
java.lang.String[] suffixes)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
canWrite(DataRaster raster,
java.lang.String formatSuffix,
java.io.File file)
Checks if a data raster could be written to a File the given format.
|
protected java.lang.String[] |
copyAndConvertToLowerCase(java.lang.String[] array)
Clones string array and also converts clones to lower case
|
protected abstract boolean |
doCanWrite(DataRaster raster,
java.lang.String formatSuffix,
java.io.File file) |
protected abstract void |
doWrite(DataRaster raster,
java.lang.String formatSuffix,
java.io.File file) |
void |
write(DataRaster raster,
java.lang.String formatSuffix,
java.io.File file)
Writes an data raster to a
File in the given format. |
protected final java.lang.String[] mimeTypes
protected final java.lang.String[] suffixes
public AbstractDataRasterWriter()
public AbstractDataRasterWriter(java.lang.String[] mimeTypes, java.lang.String[] suffixes)
mimeTypes
- MIME types as array ofStrings
suffixes
- Suffixes (extensions) as array ofStrings
public boolean canWrite(DataRaster raster, java.lang.String formatSuffix, java.io.File file)
canWrite
in interface DataRasterWriter
raster
- a data raster to be written to a File
in the given format.formatSuffix
- a String
containing the format suffixfile
- a File
to be written toTRUE
, if a data raster could be written to the File
protected java.lang.String[] copyAndConvertToLowerCase(java.lang.String[] array)
array
- string arrayprotected abstract boolean doCanWrite(DataRaster raster, java.lang.String formatSuffix, java.io.File file)
protected abstract void doWrite(DataRaster raster, java.lang.String formatSuffix, java.io.File file) throws java.io.IOException
java.io.IOException
public void write(DataRaster raster, java.lang.String formatSuffix, java.io.File file) throws java.io.IOException
File
in the given format.
If there is already a File present, its contents are discarded.write
in interface DataRasterWriter
raster
- a data raster to be writtenformatSuffix
- a String
containing the format suffixfile
- a File
to be written tojava.io.IOException
- if any parameter is null
or invalid