Package com.xceptance.xlt.api.validators

# Class ContentLengthValidator

java.lang.Object
com.xceptance.xlt.api.validators.ContentLengthValidator

public class ContentLengthValidator extends Object
Validates the downloaded content length with the announced size from the HTTP header.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ContentLengthValidator()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ContentLengthValidator`
  `getInstance()`
  Returns the singleton instance.
  `void`
  `validate(LightWeightPage page)`
  Validates the specified lightweight HTML page.
  `void`
  `validate(HtmlPage page)`
  Validates the specified HTML page.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ContentLengthValidator

    public ContentLengthValidator()

- ## Method Details

  - ### validate

    public void validate(HtmlPage page)
    Validates the specified HTML page.
    Parameters:
      `page` - the page to check
    Throws:
      `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:
      `AssertionError` - if the page fails validation

  - ### getInstance

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