org.apache.batik.refimpl.transcoder
Class ImageTranscoder

java.lang.Object
  |
  +--org.apache.batik.refimpl.transcoder.AbstractTranscoder
        |
        +--org.apache.batik.refimpl.transcoder.ImageTranscoder
All Implemented Interfaces:
Transcoder
Direct Known Subclasses:
JpegTranscoder, PngTranscoder

public abstract class ImageTranscoder
extends AbstractTranscoder

A generic Transcoder to transcode document to an image.


Fields inherited from class org.apache.batik.refimpl.transcoder.AbstractTranscoder
hints
 
Constructor Summary
ImageTranscoder()
           
 
Method Summary
abstract  java.awt.image.BufferedImage createImage(int w, int h)
          Creates a new image of the specified dimension.
 void transcodeToStream(Document document, java.io.OutputStream ostream)
          Transcodes the specified document and write the result to the specified output.
abstract  void writeImage(java.awt.image.BufferedImage img, java.io.OutputStream ostream)
          Writes the specified image to the specified output stream.
 
Methods inherited from class org.apache.batik.refimpl.transcoder.AbstractTranscoder
addTranscodingHint, getBackgroundPaint, getDefaultViewport, getGVTBuilder, getParserClassName, getTranscodingHints, setTranscodingHints, transcodeToStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.batik.transcoder.Transcoder
getMimeType
 

Constructor Detail

ImageTranscoder

public ImageTranscoder()
Method Detail

transcodeToStream

public void transcodeToStream(Document document,
                              java.io.OutputStream ostream)
                       throws TranscoderException
Description copied from interface: Transcoder
Transcodes the specified document and write the result to the specified output.
Following copied from interface: org.apache.batik.transcoder.Transcoder
Parameters:
document - the document to transcode
ostream - the ouput stream where to write the transcoded input
Throws:
TranscoderException - if an error occured while transcoding

createImage

public abstract java.awt.image.BufferedImage createImage(int w,
                                                         int h)
Creates a new image of the specified dimension.
Parameters:
w - the width of the image
h - the height of the image

writeImage

public abstract void writeImage(java.awt.image.BufferedImage img,
                                java.io.OutputStream ostream)
                         throws java.io.IOException
Writes the specified image to the specified output stream.
Parameters:
img - the image to write
ostream - the output stream where to write the image
IOException - if an IO error occured


Copyright © 2000 Apache Software Foundation. All Rights Reserved.