org.apache.batik.transcoder.svg2svg

Class SVGTranscoder

public class SVGTranscoder extends AbstractTranscoder

This class is a trancoder from SVG to SVG.
Nested Class Summary
protected static classSVGTranscoder.DoctypeKey
To represent a doctype key.
protected static classSVGTranscoder.DoctypeValue
To represent a doctype value.
protected static classSVGTranscoder.NewlineKey
To represent a newline key.
protected static classSVGTranscoder.NewlineValue
To represent a newline value.
Field Summary
static ErrorHandlerDEFAULT_ERROR_HANDLER
The default error handler.
static TranscodingHints.KeyKEY_DOCTYPE
The key to specify the doctype option.
static TranscodingHints.KeyKEY_DOCUMENT_WIDTH
The key to specify the document width.
static TranscodingHints.KeyKEY_FORMAT
The key to specify whether to format the input.
static TranscodingHints.KeyKEY_NEWLINE
The key to specify the newline character sequence.
static TranscodingHints.KeyKEY_PUBLIC_ID
The key to specify the public id.
static TranscodingHints.KeyKEY_SYSTEM_ID
The key to specify the system id.
static TranscodingHints.KeyKEY_TABULATION_WIDTH
The key to specify the tabulation width.
static TranscodingHints.KeyKEY_XML_DECLARATION
The key to specify the XML declaration option.
static SVGTranscoder.DoctypeValueVALUE_DOCTYPE_CHANGE
The doctype value to change the declaration.
static SVGTranscoder.DoctypeValueVALUE_DOCTYPE_KEEP_UNCHANGED
The doctype value to keep unchanged the declaration.
static SVGTranscoder.DoctypeValueVALUE_DOCTYPE_REMOVE
The doctype value to remove the declaration.
static BooleanVALUE_FORMAT_OFF
The value to turn off formatting.
static BooleanVALUE_FORMAT_ON
The value to turn on formatting.
static SVGTranscoder.NewlineValueVALUE_NEWLINE_CR
The "\r" newline value.
static SVGTranscoder.NewlineValueVALUE_NEWLINE_CR_LF
The "\r\n" newline value.
static SVGTranscoder.NewlineValueVALUE_NEWLINE_LF
The "\n" newline value.
Constructor Summary
SVGTranscoder()
Creates a new SVGTranscoder.
Method Summary
protected voidprettyPrint(Reader in, Writer out)
Pretty print the given reader.
voidtranscode(TranscoderInput input, TranscoderOutput output)
Transcodes the specified input in the specified output.

Field Detail

DEFAULT_ERROR_HANDLER

public static final ErrorHandler DEFAULT_ERROR_HANDLER
The default error handler.

KEY_DOCTYPE

public static final TranscodingHints.Key KEY_DOCTYPE
The key to specify the doctype option.

KEY_DOCUMENT_WIDTH

public static final TranscodingHints.Key KEY_DOCUMENT_WIDTH
The key to specify the document width.

KEY_FORMAT

public static final TranscodingHints.Key KEY_FORMAT
The key to specify whether to format the input.

KEY_NEWLINE

public static final TranscodingHints.Key KEY_NEWLINE
The key to specify the newline character sequence.

KEY_PUBLIC_ID

public static final TranscodingHints.Key KEY_PUBLIC_ID
The key to specify the public id.

KEY_SYSTEM_ID

public static final TranscodingHints.Key KEY_SYSTEM_ID
The key to specify the system id.

KEY_TABULATION_WIDTH

public static final TranscodingHints.Key KEY_TABULATION_WIDTH
The key to specify the tabulation width.

KEY_XML_DECLARATION

public static final TranscodingHints.Key KEY_XML_DECLARATION
The key to specify the XML declaration option.

VALUE_DOCTYPE_CHANGE

public static final SVGTranscoder.DoctypeValue VALUE_DOCTYPE_CHANGE
The doctype value to change the declaration.

VALUE_DOCTYPE_KEEP_UNCHANGED

public static final SVGTranscoder.DoctypeValue VALUE_DOCTYPE_KEEP_UNCHANGED
The doctype value to keep unchanged the declaration.

VALUE_DOCTYPE_REMOVE

public static final SVGTranscoder.DoctypeValue VALUE_DOCTYPE_REMOVE
The doctype value to remove the declaration.

VALUE_FORMAT_OFF

public static final Boolean VALUE_FORMAT_OFF
The value to turn off formatting.

VALUE_FORMAT_ON

public static final Boolean VALUE_FORMAT_ON
The value to turn on formatting.

VALUE_NEWLINE_CR

public static final SVGTranscoder.NewlineValue VALUE_NEWLINE_CR
The "\r" newline value.

VALUE_NEWLINE_CR_LF

public static final SVGTranscoder.NewlineValue VALUE_NEWLINE_CR_LF
The "\r\n" newline value.

VALUE_NEWLINE_LF

public static final SVGTranscoder.NewlineValue VALUE_NEWLINE_LF
The "\n" newline value.

Constructor Detail

SVGTranscoder

public SVGTranscoder()
Creates a new SVGTranscoder.

Method Detail

prettyPrint

protected void prettyPrint(Reader in, Writer out)
Pretty print the given reader.

transcode

public void transcode(TranscoderInput input, TranscoderOutput output)
Transcodes the specified input in the specified output.

Parameters: input the input to transcode output the ouput where to transcode

Throws: TranscoderException if an error occured while transcoding

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