com.googlecode.htmlcompressor.compressor

## Class HtmlMetrics

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

-     public class HtmlMetrics
      extends Object

  Class that stores metrics about HTML documents.
  Author:
    Sergiy Kovalchuk

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HtmlMetrics()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getEmptyChars()` Returns number of empty characters (spaces, tabs, end of lines) in a document.
    `int` | `getFilesize()` Returns total filesize of a document.
    `int` | `getInlineEventSize()` Returns total size of inline event handlers (`onclick`, etc).
    `int` | `getInlineScriptSize()` Returns total size of inline `<script>` tags.
    `int` | `getInlineStyleSize()` Returns total size of inline `<style>` tags.
    `void` | `setEmptyChars(int emptyChars)` Sets the empty chars.
    `void` | `setFilesize(int filesize)` Sets the filesize.
    `void` | `setInlineEventSize(int inlineEventSize)` Sets the inline event size.
    `void` | `setInlineScriptSize(int inlineScriptSize)` Sets the inline script size.
    `void` | `setInlineStyleSize(int inlineStyleSize)` Sets the inline style size.
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### HtmlMetrics

          public HtmlMetrics()

  - ### Method Detail

    - #### getFilesize

          public int getFilesize()

      Returns total filesize of a document.
      Returns:
        total filesize of a document, in bytes

    - #### setFilesize

          public void setFilesize(int filesize)

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

    - #### getEmptyChars

          public int getEmptyChars()

      Returns number of empty characters (spaces, tabs, end of lines) in a document.
      Returns:
        number of empty characters in a document

    - #### setEmptyChars

          public void setEmptyChars(int emptyChars)

      Sets the empty chars.
      Parameters:
        `emptyChars` - the emptyChars to set

    - #### getInlineScriptSize

          public int getInlineScriptSize()

      Returns total size of inline `<script>` tags.
      Returns:
        total size of inline `<script>` tags, in bytes

    - #### setInlineScriptSize

          public void setInlineScriptSize(int inlineScriptSize)

      Sets the inline script size.
      Parameters:
        `inlineScriptSize` - the inlineScriptSize to set

    - #### getInlineStyleSize

          public int getInlineStyleSize()

      Returns total size of inline `<style>` tags.
      Returns:
        total size of inline `<style>` tags, in bytes

    - #### setInlineStyleSize

          public void setInlineStyleSize(int inlineStyleSize)

      Sets the inline style size.
      Parameters:
        `inlineStyleSize` - the inlineStyleSize to set

    - #### getInlineEventSize

          public int getInlineEventSize()

      Returns total size of inline event handlers (`onclick`, etc).
      Returns:
        total size of inline event handlers, in bytes

    - #### setInlineEventSize

          public void setInlineEventSize(int inlineEventSize)

      Sets the inline event size.
      Parameters:
        `inlineEventSize` - the inlineEventSize to set

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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