TranscoderInput transcoderInput = new TranscoderInput(stringReader);
// Create the transcoder output.
TranscoderOutput transcoderOutput = new TranscoderOutput(os);
try {
pngTranscoder.transcode(transcoderInput, transcoderOutput);
} catch (TranscoderException te) {
// code compatible with jdk 1.5
IOException ioe = new IOException("Transcoder error");
ioe.initCause(te);
throw ioe;