Package org.jxmpp.xml.splitter
Class XmppXmlSplitter
java.lang.Object
java.io.Writer
org.jxmpp.xml.splitter.XmlSplitter
org.jxmpp.xml.splitter.XmppXmlSplitter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
A XML splitter for XMPP. Unlike
XmlSplitter
, this splitter is aware
of the special semantics of XMPP's <stream:stream>
element.-
Field Summary
Fields inherited from class org.jxmpp.xml.splitter.XmlSplitter
completeElementCallback
-
Constructor Summary
ConstructorDescriptionXmppXmlSplitter
(int maxElementSize, XmppElementCallback xmppElementCallback) Construct a new XMPP XML splitter.XmppXmlSplitter
(int maxElementSize, XmppElementCallback xmppElementCallback, DeclarationCallback declarationCallback, ProcessingInstructionCallback processingInstructionCallback) Construct a new XMPP XML splitter.XmppXmlSplitter
(int maxElementSize, XmppElementCallback xmppElementCallback, DeclarationCallback declarationCallback, ProcessingInstructionCallback processingInstructionCallback, XmlPrinter xmlPrinter) Construct a new XMPP XML splitter.XmppXmlSplitter
(int maxElementSize, XmppElementCallback xmppElementCallback, XmlPrinter xmlPrinter) Constructs a new XMPP XML splitter.XmppXmlSplitter
(XmlPrinter xmlPrinter) Constructs a new XMPP XML splitter without any maximum element size restrictions using the given XML printer.XmppXmlSplitter
(XmppElementCallback xmppElementCallback) Construct a new XMPP XML splitter with a max element size of 10000.XmppXmlSplitter
(XmppElementCallback xmppElementCallback, DeclarationCallback declarationCallback, ProcessingInstructionCallback processingInstructionCallback) Construct a new XMPP XML splitter with a max element size of 10000. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
protected void
Methods inherited from class org.jxmpp.xml.splitter.XmlSplitter
close, flush, getCurrentSplittedPartSize, newSplittedPart, write
-
Constructor Details
-
XmppXmlSplitter
Construct a new XMPP XML splitter with a max element size of 10000.RFC 6120 § 13.12 4. requires XMPP servers to use nothing less then 10000 as maximum stanza size.
- Parameters:
xmppElementCallback
- the callback invoked once a complete element has been processed.
-
XmppXmlSplitter
public XmppXmlSplitter(XmppElementCallback xmppElementCallback, DeclarationCallback declarationCallback, ProcessingInstructionCallback processingInstructionCallback) Construct a new XMPP XML splitter with a max element size of 10000.RFC 6120 § 13.12 4. requires XMPP servers to use nothing less then 10000 as maximum stanza size.
- Parameters:
xmppElementCallback
- the callback invoked once a complete element has been processed.declarationCallback
- a optional callback for XML Declarations.processingInstructionCallback
- a optional callback for XML Processing Instructions.
-
XmppXmlSplitter
Construct a new XMPP XML splitter.- Parameters:
maxElementSize
- the maximum size of a single top level element in bytes.xmppElementCallback
- the callback invoked once a complete element has been processed.
-
XmppXmlSplitter
public XmppXmlSplitter(int maxElementSize, XmppElementCallback xmppElementCallback, DeclarationCallback declarationCallback, ProcessingInstructionCallback processingInstructionCallback) Construct a new XMPP XML splitter.- Parameters:
maxElementSize
- the maximum size of a single top level element in bytes.xmppElementCallback
- the callback invoked once a complete element has been processed.declarationCallback
- a optional callback for XML Declarations.processingInstructionCallback
- a optional callback for XML Processing Instructions.
-
XmppXmlSplitter
Constructs a new XMPP XML splitter without any maximum element size restrictions using the given XML printer.- Parameters:
xmlPrinter
- the optional XML printer to use.
-
XmppXmlSplitter
public XmppXmlSplitter(int maxElementSize, XmppElementCallback xmppElementCallback, XmlPrinter xmlPrinter) Constructs a new XMPP XML splitter.- Parameters:
maxElementSize
- the maximum size of a single top level element in bytes.xmppElementCallback
- the callback invoked once a complete element has been processed.xmlPrinter
- the optional XML printer to use.
-
XmppXmlSplitter
public XmppXmlSplitter(int maxElementSize, XmppElementCallback xmppElementCallback, DeclarationCallback declarationCallback, ProcessingInstructionCallback processingInstructionCallback, XmlPrinter xmlPrinter) Construct a new XMPP XML splitter.- Parameters:
maxElementSize
- the maximum size of a single top level element in bytes.xmppElementCallback
- the callback invoked once a complete element has been processed.declarationCallback
- a optional callback for XML Declarations.processingInstructionCallback
- a optional callback for XML Processing Instructions.xmlPrinter
- The optional XML printer to use.
-
-
Method Details
-
onNextChar
- Overrides:
onNextChar
in classXmlSplitter
- Throws:
IOException
-
onStartTag
- Overrides:
onStartTag
in classXmlSplitter
-
onEndTag
- Overrides:
onEndTag
in classXmlSplitter
-