// Otherwise we get an exception when Cocoon.process
// tries to flush/close the stream again.
ByteArrayOutputStream baos = new ByteArrayOutputStream(8192);
TranscoderOutput transOutput = new TranscoderOutput(baos);
transcoder.transcode(transInput, transOutput);
baos.writeTo(this.output);
} catch (Exception ex) {
log.error("SVGSerializer: Exception writing image", ex);
throw new SAXException("Exception writing image ", ex);
}
}