// The input to an ImageReader is an ImageInputStream but
// the TranscoderInput constructor expects a standard ouput stream,
// which is not compatible with ImageInputStream. A work around to
// this problem is to use a Wrapper class to encapsulate the
// ImageInputStream in a class that extends InputStream.
ImageInputStreamAdaptor imageInputStreamAdaptor =
new ImageInputStreamAdaptor(inputStream);
// create a servlet
ImageTranscoder bufferedImgTranscoder =
new BufferedImageTranscoder();