Interface PageParser

All Known Implementing Classes:
DivExtractingPageParser, FastPageParser, HTMLPageParser, MultipassReplacementPageParser, PartialPageParser, SuperFastSimplePageParser

public interface PageParser
The PageParser is responsible for parsing the page data into an appropriate Page object.

The implementation of this can be switched to parse different kind of data (e.g. HTML, WML, FOP, images) or for performance enhancements. An implementation is obtained through the Factory .

A single PageParser is reused, therefore the parse() methods need to be thread-safe.

Author:
Joe Walnes
  • Method Summary

    Modifier and Type
    Method
    Description
    parse(char[] buffer)
    Deprecated.
    Use parse(SitemeshBuffer), to allow performance improvement such as single buffer parsing and buffer chaining.
    Parse the given buffer into a page object.
  • Method Details

    • parse

      Page parse(SitemeshBuffer buffer) throws IOException
      Parse the given buffer into a page object. DefaultSitemeshBuffer is the appropriate implementation of this interface to pass in.
      Parameters:
      buffer - The buffer for the page.
      Returns:
      The parsed page
      Throws:
      IOException - if an error occurs
    • parse

      @Deprecated Page parse(char[] buffer) throws IOException
      Deprecated.
      Use parse(SitemeshBuffer), to allow performance improvement such as single buffer parsing and buffer chaining.
      Parse the given buffer into a Page object.
      Parameters:
      buffer - The buffer for the page.
      Returns:
      The parsed page
      Throws:
      IOException - if an error occurs