Interface IDocumentHandler

All Known Subinterfaces:
IMarkupHandler
All Known Implementing Classes:
AbstractChainedMarkupHandler, AbstractMarkupHandler, AttributeSelectionMarkingMarkupHandler, BlockSelectorMarkupHandler, DiscardMarkupHandler, DOMBuilderMarkupHandler, DuplicateMarkupHandler, HtmlMarkupHandler, MarkupEventProcessorHandler, MinimizeHtmlMarkupHandler, NodeSelectorMarkupHandler, OutputMarkupHandler, PrettyHtmlMarkupHandler, SimplifierMarkupHandler, TextOutputMarkupHandler, TraceBuilderMarkupHandler

public interface IDocumentHandler

Interface to be implemented by all handlers capable of receiving events about document start/end.

Events in this interface are a part of the IMarkupHandler interface, the main handling interface in AttoParser.

Since:
2.0.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handleDocumentEnd(long endTimeNanos, long totalTimeNanos, int line, int col)
    Called at the end of document parsing.
    void
    handleDocumentStart(long startTimeNanos, int line, int col)
    Called at the beginning of document parsing.
  • Method Details

    • handleDocumentStart

      void handleDocumentStart(long startTimeNanos, int line, int col) throws ParseException

      Called at the beginning of document parsing.

      Parameters:
      startTimeNanos - the current time (in nanoseconds) obtained when parsing starts.
      line - the line of the document where parsing starts (usually number 1).
      col - the column of the document where parsing starts (usually number 1).
      Throws:
      ParseException - if any exceptions occur during handling.
    • handleDocumentEnd

      void handleDocumentEnd(long endTimeNanos, long totalTimeNanos, int line, int col) throws ParseException

      Called at the end of document parsing.

      Parameters:
      endTimeNanos - the current time (in nanoseconds) obtained when parsing ends.
      totalTimeNanos - the difference between current times at the start and end of parsing (in nanoseconds).
      line - the line of the document where parsing ends (usually the last one).
      col - the column of the document where the parsing ends (usually the last one).
      Throws:
      ParseException - if any exceptions occur during handling.