final GridCoverage2D coverage = (GridCoverage2D) coverages[0];
// ImageIOUtilities.visualize(coverage.getRenderedImage());
// write the coverage
try {
delegate.encode(coverage, outputFormat,Collections.EMPTY_MAP, output);
output.flush();
} finally {
// if(output != null) output.close();
}
}