The ContentHandler which should receive SAX events
The maximum size of the buffer. The buffer is emptied whenever possible. If the buffer is filled while processing a text node, the ContentHandler will receive multiple split text nodes. If it is filled in the middle of an element tag, or CDATA section, I don't konw what will happen. Probably an exception. In general, I would avoid CDATA input. Elements should never be longer than a few hundred characters anyway.
Deterministic Finite State Automaton that implements some XML-like grammar. The only state it keeps is: * A buffer of characters that have yet to be consumed * Two namespace stacks (a default namespace stack and a stack of namespace prefix to URI mappings)
Other than that, it processes input one character at a time, and emits SAX events to the given receiver.
It does no validation.
It knows nothing about DTDs or external entities.
It does nothing with processing instructions (other than emit them to the ContentHandler)
It does not handle errors (nor emit them) except for a few catastrophic parse errors (in which case it will throw an exception)
It won't issue an endDocument event until close() is called (at which point it will emit one immediately)