org.apache.batik.transcoder

Class TranscoderSupport

public class TranscoderSupport extends Object

This is a utility class that can be used by transcoders that support transcoding hints and/or error handler.
Field Summary
protected ErrorHandlerhandler
The error handler used to report warnings and errors.
protected TranscodingHintshints
The transcoding hints.
Constructor Summary
TranscoderSupport()
Constructs a new TranscoderSupport.
Method Summary
voidaddTranscodingHint(TranscodingHints.Key key, Object value)
Sets the value of a single preference for the transcoding process.
ErrorHandlergetErrorHandler()
Returns the error handler this transcoder uses to report warnings and errors, or null if any.
TranscodingHintsgetTranscodingHints()
Returns a copy of the transcoding hints of this transcoder.
voidremoveTranscodingHint(TranscodingHints.Key key)
Removes the value of a single preference for the transcoding process.
voidsetErrorHandler(ErrorHandler handler)
Sets the error handler this transcoder may use to report warnings and errors.
voidsetTranscodingHints(Map hints)
Replaces the values of all preferences for the transcoding algorithms with the specified hints.
voidsetTranscodingHints(TranscodingHints hints)
Sets the values of all preferences for the transcoding algorithms with the specified hints.

Field Detail

handler

protected ErrorHandler handler
The error handler used to report warnings and errors.

hints

protected TranscodingHints hints
The transcoding hints.

Constructor Detail

TranscoderSupport

public TranscoderSupport()
Constructs a new TranscoderSupport.

Method Detail

addTranscodingHint

public void addTranscodingHint(TranscodingHints.Key key, Object value)
Sets the value of a single preference for the transcoding process.

Parameters: key the key of the hint to be set value the value indicating preferences for the specified hint category.

getErrorHandler

public ErrorHandler getErrorHandler()
Returns the error handler this transcoder uses to report warnings and errors, or null if any.

getTranscodingHints

public TranscodingHints getTranscodingHints()
Returns a copy of the transcoding hints of this transcoder.

removeTranscodingHint

public void removeTranscodingHint(TranscodingHints.Key key)
Removes the value of a single preference for the transcoding process.

Parameters: key the key of the hint to remove

setErrorHandler

public void setErrorHandler(ErrorHandler handler)
Sets the error handler this transcoder may use to report warnings and errors.

Parameters: handler to ErrorHandler to use

setTranscodingHints

public void setTranscodingHints(Map hints)
Replaces the values of all preferences for the transcoding algorithms with the specified hints.

Parameters: hints the rendering hints to be set

setTranscodingHints

public void setTranscodingHints(TranscodingHints hints)
Sets the values of all preferences for the transcoding algorithms with the specified hints.

Parameters: hints the rendering hints to be set

Copyright B) 2007 Apache Software Foundation. All Rights Reserved.