Package org.jxmpp.xml.splitter
Class XmlSplitter
java.lang.Object
java.io.Writer
org.jxmpp.xml.splitter.XmlSplitter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
- Direct Known Subclasses:
XmppXmlSplitter
A XML splitter capable of splitting XML into top-level elements.
Note that this class does not yet support the feature set of XML. Only the required features for XMPP are supported. XML comments and processing instructions are not supported.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionXmlSplitter
(int bufferSize, CompleteElementCallback completeElementCallback) Construct a new XML splitter.XmlSplitter
(int bufferSize, CompleteElementCallback completeElementCallback, DeclarationCallback declarationCallback, ProcessingInstructionCallback processingInstructionCallback) Construct a new XML splitter.XmlSplitter
(int bufferSize, CompleteElementCallback completeElementCallback, DeclarationCallback declarationCallback, ProcessingInstructionCallback processingInstructionCallback, XmlPrinter xmlPrinter) Construct a new XML splitter.XmlSplitter
(int bufferSize, CompleteElementCallback completeElementCallback, XmlPrinter xmlPrinter) Construct a new XML splitter. -
Method Summary
-
Field Details
-
completeElementCallback
-
-
Constructor Details
-
XmlSplitter
public XmlSplitter(int bufferSize, CompleteElementCallback completeElementCallback, DeclarationCallback declarationCallback, ProcessingInstructionCallback processingInstructionCallback) Construct a new XML splitter.- Parameters:
bufferSize
- the initial size of the buffer.completeElementCallback
- the callback invoked once a complete element has been processed.declarationCallback
- a optional callback for the XML declaration.processingInstructionCallback
- a optional callback for Processing Instructions.
-
XmlSplitter
public XmlSplitter(int bufferSize, CompleteElementCallback completeElementCallback, XmlPrinter xmlPrinter) Construct a new XML splitter.- Parameters:
bufferSize
- the initial size of the buffer.completeElementCallback
- the callback invoked once a complete element has been processed.xmlPrinter
- an optionalXmlPrinter
.
-
XmlSplitter
Construct a new XML splitter.- Parameters:
bufferSize
- the initial size of the buffer.completeElementCallback
- the callback invoked once a complete element has been processed.
-
XmlSplitter
public XmlSplitter(int bufferSize, CompleteElementCallback completeElementCallback, DeclarationCallback declarationCallback, ProcessingInstructionCallback processingInstructionCallback, XmlPrinter xmlPrinter) Construct a new XML splitter.- Parameters:
bufferSize
- the initial size of the buffer.completeElementCallback
- the callback invoked once a complete element has been processed.declarationCallback
- a optional callback for the XML declaration.processingInstructionCallback
- a optional callback for Processing Instructions.xmlPrinter
- an optionalXmlPrinter
.
-
-
Method Details
-
write
- Specified by:
write
in classWriter
- Throws:
IOException
-
flush
-
close
-
getCurrentSplittedPartSize
Get the size in bytes of the splitted part currently being processed.- Returns:
- the size of the current splitted part in chars.
-
onNextChar
- Throws:
IOException
-
onStartTag
-
onEndTag
-
newSplittedPart
-