public interface ITextHandler
Interface to be implemented by all handlers capable of receiving events about Text events.
Events in this interface are a part of the
IMarkupHandler interface, the main handling interface in
void handleText(char buffer, int offset, int len, int line, int col) throws ParseException
Called when a text artifact is found.
A sequence of chars is considered to be text when no structures of any kind are contained inside it. In markup parsers, for example, this means no tags (a.k.a. elements), DOCTYPE's, processing instructions, etc. are contained in the sequence.
Text sequences might include any number of new line and/or control characters.
Text artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported texts should be copied if they need to be stored (either by copying len chars from the buffer char starting in offset or by creating a String from it using the same specification).
Implementations of this handler should never modify the document buffer.
buffer- the document buffer (not copied)
offset- the offset (position in buffer) where the text artifact starts.
len- the length (in chars) of the text artifact, starting in offset.
line- the line in the original document where this text artifact starts.
col- the column in the original document where this text artifact starts.
ParseException- if any exceptions occur during handling.
Copyright © 2018 The ATTOPARSER team. All rights reserved.