org.apache.batik.transcoder |
Contains all of the interfaces for transcoding an input stream or
a document to a particular ouput format.
|
Java Source File Name | Type | Comment |
AbstractTranscoder.java | Class | This class can be the base class of a transcoder which may support
transcoding hints and/or error handler. |
DefaultErrorHandler.java | Class | A default ErrorHandler that throws a
TranscoderException when a fatal error occured and display
a message when a warning or an error occured. |
ErrorHandler.java | Interface | This interface provides a way to catch errors and warnings from a
Transcoder.
If an application needs to implement customized error handling, it
must implement this interface and then register an instance with
the Transcoder using the transcoder's setErrorHandler method. |
SVGAbstractTranscoder.java | Class | This class may be the base class of all transcoders which take an
SVG document as input and which need to build a DOM tree. |
ToSVGAbstractTranscoder.java | Class | This class allows to simplify the creation of a transcoder which transcodes to
SVG content.
To use this class, you just have to implement the transcode method of
the AbstractTranscoder class :
Document doc = this.createDocument(output);
svgGenerator = new SVGGraphics2D(doc);
Perform the effective transcoding, using the
org.apache.batik.svggen.SVGGraphics2D previously created
then call the
ToSVGAbstractTranscoder.writeSVGToOutput(SVGGraphics2D,Element,TranscoderOutput) to create the
effective output file (if the output is set to be a File or URI)
Element svgRoot = svgGenerator.getRoot();
writeSVGToOutput(svgGenerator, svgRoot, output);
Several transcoding hints are defined for this abstract transcoder, but no default
implementation is provided. |
Transcoder.java | Interface | This class defines an API for transcoding. |
TranscoderException.java | Class | Thrown when a transcoder is not able to transcode its input. |
TranscoderInput.java | Class | This class represents a generic input of a Transcoder. |
TranscoderInputTest.java | Class | This test validates that the various configurations of TranscoderInput
are supported by the XMLAbstractTranscoder class. |
TranscoderOutput.java | Class | This class represents a single output for a Transcoder. |
TranscoderSupport.java | Class | This is a utility class that can be used by transcoders that
support transcoding hints and/or error handler. |
TranscodingHints.java | Class | The TranscodingHints class defines a way to pass
transcoding parameters or options to any transcoders. |
XMLAbstractTranscoder.java | Class | This class may be the base class of all transcoders which take an
XML document as input and which need to build a DOM tree. |