Package org.jxmpp.xml.splitter
Class XmlPrettyPrinter.Builder
- java.lang.Object
-
- org.jxmpp.xml.splitter.XmlPrettyPrinter.Builder
-
- Enclosing class:
- XmlPrettyPrinter
public static final class XmlPrettyPrinter.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XmlPrettyPrinter
build()
Build an XML pretty printer.XmlPrettyPrinter.Builder
setAttributeIndent(int attributeIndent)
Set the attribute indent in whitespace characters.XmlPrettyPrinter.Builder
setChunkCallback(XmlPrettyPrinter.PrettyPrintedXmlChunkWithCurrentPartCallback chunkCallback)
Set a chunk callback.XmlPrettyPrinter.Builder
setIndent(int indent)
Set the indent for elements in whitespace characters.XmlPrettyPrinter.Builder
setPartCallback(XmlPrettyPrinter.PrettyPrintedXmlPartCallback partCallback)
Set a part callback.XmlPrettyPrinter.Builder
setPrettyWriter(XmlPrettyPrinter.PrettyPrintedXmlChunkSink prettyWriter)
Set aXmlPrettyPrinter.PrettyPrintedXmlChunkSink
for the pretty printed XML stream.XmlPrettyPrinter.Builder
setTabWidth(int tabWidth)
Set the tab width in whitespace characters.
-
-
-
Method Detail
-
setIndent
public XmlPrettyPrinter.Builder setIndent(int indent)
Set the indent for elements in whitespace characters.- Parameters:
indent
- the indent for elements in whitespace characters.- Returns:
- a reference to this builders.
-
setAttributeIndent
public XmlPrettyPrinter.Builder setAttributeIndent(int attributeIndent)
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
public XmlPrettyPrinter.Builder setTabWidth(int tabWidth)
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
public XmlPrettyPrinter build()
Build an XML pretty printer.- Returns:
- the newly build XML pretty printer.
-
-