Class ContentLengthValidator


  • public class ContentLengthValidator
    extends java.lang.Object
    Validates the downloaded content length with the announced size from the HTTP header.
    • Constructor Detail

      • ContentLengthValidator

        public ContentLengthValidator()
    • Method Detail

      • validate

        public void validate​(HtmlPage page)
        Validates the specified HTML page.
        Parameters:
        page - the page to check
        Throws:
        java.lang.AssertionError - if the page fails validation
      • validate

        public void validate​(LightWeightPage page)
        Validates the specified lightweight HTML page.
        Parameters:
        page - the page to check
        Throws:
        java.lang.AssertionError - if the page fails validation
      • getInstance

        public static ContentLengthValidator getInstance()
        Returns the singleton instance.
        Returns:
        the singleton instance