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 Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XmlPrettyPrinterbuild()Build an XML pretty printer.XmlPrettyPrinter.BuildersetAttributeIndent(int attributeIndent)Set the attribute indent in whitespace characters.XmlPrettyPrinter.BuildersetChunkCallback(XmlPrettyPrinter.PrettyPrintedXmlChunkWithCurrentPartCallback chunkCallback)Set a chunk callback.XmlPrettyPrinter.BuildersetIndent(int indent)Set the indent for elements in whitespace characters.XmlPrettyPrinter.BuildersetPartCallback(XmlPrettyPrinter.PrettyPrintedXmlPartCallback partCallback)Set a part callback.XmlPrettyPrinter.BuildersetPrettyWriter(XmlPrettyPrinter.PrettyPrintedXmlChunkSink prettyWriter)Set aXmlPrettyPrinter.PrettyPrintedXmlChunkSinkfor the pretty printed XML stream.XmlPrettyPrinter.BuildersetTabWidth(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.PrettyPrintedXmlChunkSinkfor 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.
-
-