public class XmlSplitter
extends java.io.Writer
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.
| Modifier and Type | Field and Description |
|---|---|
protected CompleteElementCallback |
completeElementCallback |
| Constructor and Description |
|---|
XmlSplitter(int bufferSize,
CompleteElementCallback completeElementCallback)
Construct a new XML splitter.
|
XmlSplitter(int bufferSize,
CompleteElementCallback completeElementCallback,
DeclarationCallback declarationCallback,
ProcessingInstructionCallback processingInstructionCallback)
Construct a new XML splitter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
int |
getCurrentSplittedPartSize()
Get the size in bytes of the splitted part currently being processed.
|
protected void |
newSplittedPart() |
protected void |
onEndTag(java.lang.String qName) |
protected void |
onNextChar() |
protected void |
onStartTag(java.lang.String prefix,
java.lang.String localpart,
java.util.Map<java.lang.String,java.lang.String> attributes) |
void |
write(char[] cbuf,
int off,
int len) |
protected final CompleteElementCallback completeElementCallback
public XmlSplitter(int bufferSize,
CompleteElementCallback completeElementCallback,
DeclarationCallback declarationCallback,
ProcessingInstructionCallback processingInstructionCallback)
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.public XmlSplitter(int bufferSize,
CompleteElementCallback completeElementCallback)
bufferSize - the initial size of the buffer.completeElementCallback - the callback invoked once a complete element has been processed.public void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.Writerjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.Writerjava.io.IOExceptionpublic final int getCurrentSplittedPartSize()
protected void onNextChar()
throws java.io.IOException
java.io.IOExceptionprotected void onStartTag(java.lang.String prefix,
java.lang.String localpart,
java.util.Map<java.lang.String,java.lang.String> attributes)
protected void onEndTag(java.lang.String qName)
protected final void newSplittedPart()