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.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageTranscoder
public ImageTranscoder()
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 transcodeostream
- 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 imageh
- 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 writeostream
- the output stream where to write the imageIOException
- if an IO error occured
Copyright © 2000 Apache Software Foundation. All Rights Reserved.