// build the path where the clients will be able to retrieve the coverage files
final String coverageLocation = buildURL(request.getBaseUrl(),
appendPath("temp/wcs", coverageFile.getName()), null, URLType.RESOURCE);
// build the response
WCSInfo wcs = geoServer.getService(WCSInfo.class);
CoveragesTransformer tx = new CoveragesTransformer(wcs, request, coverageLocation);
try {
tx.transform(coverageInfo, output);
} catch (TransformerException e) {
throw new WcsException("Failure trying to encode Coverages response", e);