Package com.nimbusds.jose
Class CompressionAlgorithm
- java.lang.Object
-
- com.nimbusds.jose.CompressionAlgorithm
-
- All Implemented Interfaces:
java.io.Serializable
@Immutable public final class CompressionAlgorithm extends java.lang.Object implements java.io.SerializableCompression algorithm name, represents thezipheader parameter in JSON Web Encryption (JWE) objects. This class is immutable.Includes a constant for the standard DEFLATE compression algorithm:
Additional compression algorithm names can be defined using the constructor.
- Version:
- 2013-01-15
- Author:
- Vladimir Dzhuvinov
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static CompressionAlgorithmDEFDEFLATE Compressed Data Format Specification version 1.3, as described in RFC 1951.
-
Constructor Summary
Constructors Constructor Description CompressionAlgorithm(java.lang.String name)Creates a new compression algorithm with the specified name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object object)OverridesObject.equals().java.lang.StringgetName()Gets the name of this compression algorithm.inthashCode()OverridesObject.hashCode().java.lang.StringtoJSONString()Returns the JSON string representation of this compression algorithm.java.lang.StringtoString()Returns the string representation of this compression algorithm.
-
-
-
Field Detail
-
DEF
public static final CompressionAlgorithm DEF
DEFLATE Compressed Data Format Specification version 1.3, as described in RFC 1951.
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the name of this compression algorithm.- Returns:
- The compression algorithm name.
-
hashCode
public int hashCode()
OverridesObject.hashCode().- Overrides:
hashCodein classjava.lang.Object- Returns:
- The object hash code.
-
equals
public boolean equals(java.lang.Object object)
OverridesObject.equals().- Overrides:
equalsin classjava.lang.Object- Parameters:
object- The object to compare to.- Returns:
trueif the objects have the same value, otherwisefalse.
-
toString
public java.lang.String toString()
Returns the string representation of this compression algorithm.- Overrides:
toStringin classjava.lang.Object- Returns:
- The string representation.
- See Also:
getName()
-
toJSONString
public java.lang.String toJSONString()
Returns the JSON string representation of this compression algorithm.- Returns:
- The JSON string representation.
-
-