Enum Class CompressionAlgorithm

java.lang.Object
java.lang.Enum<CompressionAlgorithm>
org.forgerock.json.jose.jwe.CompressionAlgorithm
All Implemented Interfaces:
Serializable, Comparable<CompressionAlgorithm>, java.lang.constant.Constable

public enum CompressionAlgorithm extends Enum<CompressionAlgorithm>
An Enum of the possible compression algorithms that can be applied to the JWE payload plaintext.

Since:
2.0.0
See Also:
  • Enum Constant Details

    • NONE

      public static final CompressionAlgorithm NONE
      When no compression is applied.
    • DEF

      public static final CompressionAlgorithm DEF
      A lossless compressed data format that compresses data using a combination of the LZ77 algorithm and Huffman coding.
  • Method Details

    • values

      public static CompressionAlgorithm[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CompressionAlgorithm valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • parseAlgorithm

      public static CompressionAlgorithm parseAlgorithm(String algorithm)
      Parses the given algorithm string to find the matching CompressionAlgorithm enum constant.
      Parameters:
      algorithm - The compression algorithm.
      Returns:
      The CompressionAlgorithm enum.