Class SVGTranscoder
java.lang.Object
org.apache.batik.transcoder.TranscoderSupport
org.apache.batik.transcoder.AbstractTranscoder
org.apache.batik.transcoder.svg2svg.SVGTranscoder
- All Implemented Interfaces:
Transcoder
This class is a trancoder from SVG to SVG.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classTo represent a doctype key.protected static classTo represent a doctype value.protected static classTo represent a newline key.protected static classTo represent a newline value. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ErrorHandlerThe default error handler.static final TranscodingHints.KeyThe key to specify the doctype option.static final TranscodingHints.KeyThe key to specify the document width.static final TranscodingHints.KeyThe key to specify whether to format the input.static final TranscodingHints.KeyThe key to specify the newline character sequence.static final TranscodingHints.KeyThe key to specify the public id.static final TranscodingHints.KeyThe key to specify the system id.static final TranscodingHints.KeyThe key to specify the tabulation width.static final TranscodingHints.KeyThe key to specify the XML declaration option.static final SVGTranscoder.DoctypeValueThe doctype value to change the declaration.static final SVGTranscoder.DoctypeValueThe doctype value to keep unchanged the declaration.static final SVGTranscoder.DoctypeValueThe doctype value to remove the declaration.static final BooleanThe value to turn off formatting.static final BooleanThe value to turn on formatting.static final SVGTranscoder.NewlineValueThe "\r" newline value.static final SVGTranscoder.NewlineValueThe "\r\n" newline value.static final SVGTranscoder.NewlineValueThe "\n" newline value.Fields inherited from class TranscoderSupport
handler, hints -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprettyPrint(Reader in, Writer out) Pretty print the given reader.voidtranscode(TranscoderInput input, TranscoderOutput output) Transcodes the specified input in the specified output.Methods inherited from class TranscoderSupport
addTranscodingHint, getErrorHandler, getTranscodingHints, removeTranscodingHint, setErrorHandler, setTranscodingHints, setTranscodingHintsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Transcoder
addTranscodingHint, getErrorHandler, getTranscodingHints, removeTranscodingHint, setErrorHandler, setTranscodingHints, setTranscodingHints
-
Field Details
-
DEFAULT_ERROR_HANDLER
The default error handler. -
KEY_NEWLINE
The key to specify the newline character sequence. -
VALUE_NEWLINE_CR
The "\r" newline value. -
VALUE_NEWLINE_CR_LF
The "\r\n" newline value. -
VALUE_NEWLINE_LF
The "\n" newline value. -
KEY_FORMAT
The key to specify whether to format the input. -
VALUE_FORMAT_ON
The value to turn on formatting. -
VALUE_FORMAT_OFF
The value to turn off formatting. -
KEY_TABULATION_WIDTH
The key to specify the tabulation width. -
KEY_DOCUMENT_WIDTH
The key to specify the document width. -
KEY_DOCTYPE
The key to specify the doctype option. -
VALUE_DOCTYPE_CHANGE
The doctype value to change the declaration. -
VALUE_DOCTYPE_REMOVE
The doctype value to remove the declaration. -
VALUE_DOCTYPE_KEEP_UNCHANGED
The doctype value to keep unchanged the declaration. -
KEY_PUBLIC_ID
The key to specify the public id. -
KEY_SYSTEM_ID
The key to specify the system id. -
KEY_XML_DECLARATION
The key to specify the XML declaration option.
-
-
Constructor Details
-
SVGTranscoder
public SVGTranscoder()Creates a new SVGTranscoder.
-
-
Method Details
-
transcode
Transcodes the specified input in the specified output.- Parameters:
input- the input to transcodeoutput- the ouput where to transcode- Throws:
TranscoderException- if an error occured while transcoding
-
prettyPrint
Pretty print the given reader.- Throws:
TranscoderException
-