com.googlecode.htmlcompressor.compressor

## Class HtmlCompressorStatistics

- java.lang.Object
- - com.googlecode.htmlcompressor.compressor.HtmlCompressorStatistics

-     public class HtmlCompressorStatistics
      extends Object

  Class that stores HTML compression statistics.
  Author:
    Sergiy Kovalchuk
  See Also:
    `HtmlCompressor.getStatistics()`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HtmlCompressorStatistics()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `HtmlMetrics` | `getCompressedMetrics()` Returns metrics of a compressed document.
    `HtmlMetrics` | `getOriginalMetrics()` Returns metrics of an uncompressed document.
    `int` | `getPreservedSize()` Returns total size of blocks that were skipped by the compressor (for example content inside `<pre>` tags or inside `<script>` tags with disabled javascript compression).
    `long` | `getTime()` Returns total compression time.
    `void` | `setCompressedMetrics(HtmlMetrics compressedMetrics)` Sets the compressed metrics.
    `void` | `setOriginalMetrics(HtmlMetrics originalMetrics)` Sets the original metrics.
    `void` | `setPreservedSize(int preservedSize)` Sets the preserved size.
    `void` | `setTime(long time)` Sets the time.
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### HtmlCompressorStatistics

          public HtmlCompressorStatistics()

  - ### Method Detail

    - #### getOriginalMetrics

          public HtmlMetrics getOriginalMetrics()

      Returns metrics of an uncompressed document.
      Returns:
        metrics of an uncompressed document
      See Also:
        `HtmlMetrics`

    - #### setOriginalMetrics

          public void setOriginalMetrics(HtmlMetrics originalMetrics)

      Sets the original metrics.
      Parameters:
        `originalMetrics` - the originalMetrics to set

    - #### getCompressedMetrics

          public HtmlMetrics getCompressedMetrics()

      Returns metrics of a compressed document.
      Returns:
        metrics of a compressed document
      See Also:
        `HtmlMetrics`

    - #### setCompressedMetrics

          public void setCompressedMetrics(HtmlMetrics compressedMetrics)

      Sets the compressed metrics.
      Parameters:
        `compressedMetrics` - the compressedMetrics to set

    - #### getTime

          public long getTime()

      Returns total compression time.

      Please note that compression performance varies very significantly depending on whether it was a cold run or not (specifics of Java VM), so for accurate real world results it is recommended to take measurements accordingly.

      Returns:
        the compression time, in milliseconds

    - #### setTime

          public void setTime(long time)

      Sets the time.
      Parameters:
        `time` - the time to set

    - #### getPreservedSize

          public int getPreservedSize()

      Returns total size of blocks that were skipped by the compressor (for example content inside `<pre>` tags or inside `<script>` tags with disabled javascript compression).
      Returns:
        the total size of blocks that were skipped by the compressor, in bytes

    - #### setPreservedSize

          public void setPreservedSize(int preservedSize)

      Sets the preserved size.
      Parameters:
        `preservedSize` - the preservedSize to set

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2009–2017 Jeremy Landis. All rights reserved.