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