Package org.jxmpp.xml.splitter
Class XmlPrettyPrinter.Builder
java.lang.Object
org.jxmpp.xml.splitter.XmlPrettyPrinter.Builder
- Enclosing class:
XmlPrettyPrinter
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build an XML pretty printer.setAttributeIndent
(int attributeIndent) Set the attribute indent in whitespace characters.Set a chunk callback.setIndent
(int indent) Set the indent for elements in whitespace characters.setPartCallback
(XmlPrettyPrinter.PrettyPrintedXmlPartCallback partCallback) Set a part callback.setPrettyWriter
(XmlPrettyPrinter.PrettyPrintedXmlChunkSink prettyWriter) Set aXmlPrettyPrinter.PrettyPrintedXmlChunkSink
for the pretty printed XML stream.setTabWidth
(int tabWidth) Set the tab width in whitespace characters.
-
Method Details
-
setIndent
Set the indent for elements in whitespace characters.- Parameters:
indent
- the indent for elements in whitespace characters.- Returns:
- a reference to this builders.
-
setAttributeIndent
Set the attribute indent in whitespace characters. Use a value smaller one to disable attribute indentation.- Parameters:
attributeIndent
- the attribute indent in whitespace characters.- Returns:
- a reference to this builder.
-
setTabWidth
Set the tab width in whitespace characters. Use a value smaller one to disable pretty printing with tabs.- Parameters:
tabWidth
- the tab width in whitespace characters.- Returns:
- a reference to this builder.
-
setChunkCallback
public XmlPrettyPrinter.Builder setChunkCallback(XmlPrettyPrinter.PrettyPrintedXmlChunkWithCurrentPartCallback chunkCallback) Set a chunk callback.- Parameters:
chunkCallback
- the chunk callback.- Returns:
- a reference to this builder.
-
setPartCallback
public XmlPrettyPrinter.Builder setPartCallback(XmlPrettyPrinter.PrettyPrintedXmlPartCallback partCallback) Set a part callback.- Parameters:
partCallback
- the part callback.- Returns:
- a reference to this builder.
-
setPrettyWriter
public XmlPrettyPrinter.Builder setPrettyWriter(XmlPrettyPrinter.PrettyPrintedXmlChunkSink prettyWriter) Set aXmlPrettyPrinter.PrettyPrintedXmlChunkSink
for the pretty printed XML stream.- Parameters:
prettyWriter
- the writer to pretty print to.- Returns:
- a reference to this builder.
-
build
Build an XML pretty printer.- Returns:
- the newly build XML pretty printer.
-