com.jscape.zip

## Class CompressionEvent

- java.lang.Object
- - java.util.EventObject
  - - com.jscape.zip.CompressionEvent

- All Implemented Interfaces:
    java.io.Serializable

      public class CompressionEvent
      extends java.util.EventObject

  Class to measure the compression progress.
  Author:
    mjawwad
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompressionEvent(java.lang.Object source, double compressedBytes, double totalBytes, ProgressEventMode mode)` Creates a CompressionEvent object

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getCompressedBytes()` Get compressed bytes.
    `ProgressEventMode` | `getMode()` Get progress event mode.
    `double` | `getPercentage()` Get bytes compressed as percentage of the total.
    `double` | `getTotalBytes()` Get total number of bytes to be compressed.

    - ### Methods inherited from class java.util.EventObject

      `getSource, toString`

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

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

- - ### Constructor Detail

    - #### CompressionEvent

          public CompressionEvent(java.lang.Object source,
                                  double compressedBytes,
                                  double totalBytes,
                                  ProgressEventMode mode)

      Creates a CompressionEvent object
      Parameters:
        `source` - - the source object
        `totalBytes` - - the total number of bytes that need to be compressed

  - ### Method Detail

    - #### getMode

          public ProgressEventMode getMode()

      Get progress event mode.
      Returns:
        mode

    - #### getCompressedBytes

          public double getCompressedBytes()

      Get compressed bytes.
      Returns:
        bytes

    - #### getTotalBytes

          public double getTotalBytes()

      Get total number of bytes to be compressed.
      Returns:
        bytes

    - #### getPercentage

          public double getPercentage()

      Get bytes compressed as percentage of the total.
      Returns:
        percentage if total bytes greater than zero, -1 otherwise

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved