org.apache.batik.refimpl.transcoder
Class AbstractTranscoder

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

public abstract class AbstractTranscoder
extends java.lang.Object
implements Transcoder

A generic Transcoder.


Field Summary
protected  TranscodingHints hints
          The transcoding hints.
 
Constructor Summary
AbstractTranscoder()
           
 
Method Summary
 void addTranscodingHint(TranscodingHints.Key key, java.lang.Object value)
          Sets the value of a single preference for the transcoding algorithms.
protected  java.awt.Paint getBackgroundPaint()
          Returns the Paint used to fill the background.
protected  Viewport getDefaultViewport()
          Returns the default Viewport to use.
protected  GVTBuilder getGVTBuilder()
          Returns the GVTBuilder to use.
protected  java.lang.String getParserClassName()
          Returns the classname of the XML parser to use.
 TranscodingHints getTranscodingHints()
          Returns the transcoding hints of this transcoder.
 void setTranscodingHints(java.util.Map hints)
          Replaces the values of all preferences for the transcoding algorithms with the specified hints.
 void transcodeToStream(InputSource isource, java.io.OutputStream ostream)
          Creates a Document using the specified isource and call the transcodeToStream(Document, OutputStream).
 
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, transcodeToStream
 

Field Detail

hints

protected TranscodingHints hints
The transcoding hints.
Constructor Detail

AbstractTranscoder

public AbstractTranscoder()
Method Detail

transcodeToStream

public void transcodeToStream(InputSource isource,
                              java.io.OutputStream ostream)
                       throws TranscoderException
Creates a Document using the specified isource and call the transcodeToStream(Document, OutputStream).
Specified by:
transcodeToStream in interface Transcoder
Following copied from interface: org.apache.batik.transcoder.Transcoder
Parameters:
isource - the input to transcode
ostream - the ouput stream where to write the transcoded input
Throws:
TranscoderException - if an error occured while transcoding

getTranscodingHints

public TranscodingHints getTranscodingHints()
Description copied from interface: Transcoder
Returns the transcoding hints of this transcoder.
Specified by:
getTranscodingHints in interface Transcoder

addTranscodingHint

public void addTranscodingHint(TranscodingHints.Key key,
                               java.lang.Object value)
Description copied from interface: Transcoder
Sets the value of a single preference for the transcoding algorithms.
Specified by:
addTranscodingHint in interface Transcoder
Following copied from interface: org.apache.batik.transcoder.Transcoder
Parameters:
key - the key of the hint to be set
value - the value indicating preferences for the specified hint category.

setTranscodingHints

public void setTranscodingHints(java.util.Map hints)
Description copied from interface: Transcoder
Replaces the values of all preferences for the transcoding algorithms with the specified hints.
Specified by:
setTranscodingHints in interface Transcoder
Following copied from interface: org.apache.batik.transcoder.Transcoder
Parameters:
hints - the rendering hints to be set

getGVTBuilder

protected GVTBuilder getGVTBuilder()
Returns the GVTBuilder to use.

getDefaultViewport

protected Viewport getDefaultViewport()
Returns the default Viewport to use.

getBackgroundPaint

protected java.awt.Paint getBackgroundPaint()
Returns the Paint used to fill the background.

getParserClassName

protected java.lang.String getParserClassName()
Returns the classname of the XML parser to use.


Copyright © 2000 Apache Software Foundation. All Rights Reserved.