com.nimbusds.jose
Class CompressionAlgorithm

java.lang.Object
  extended by com.nimbusds.jose.CompressionAlgorithm
All Implemented Interfaces:
net.minidev.json.JSONAware

@Immutable
public final class CompressionAlgorithm
extends java.lang.Object
implements net.minidev.json.JSONAware

Compression algorithm name, represents the zip header 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:
$version$ (2013-01-15)
Author:
Vladimir Dzhuvinov

Field Summary
static CompressionAlgorithm DEF
          DEFLATE Compressed Data Format Specification version 1.3, as described in RFC 1951.
 
Constructor Summary
CompressionAlgorithm(java.lang.String name)
          Creates a new compression algorithm with the specified name.
 
Method Summary
 boolean equals(java.lang.Object object)
          Overrides Object.equals().
 java.lang.String getName()
          Gets the name of this compression algorithm.
 int hashCode()
          Overrides Object.hashCode().
 java.lang.String toJSONString()
          Returns the JSON string representation of this compression algorithm.
 java.lang.String toString()
          Returns the string representation of this compression algorithm.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEF

public static final CompressionAlgorithm DEF
DEFLATE Compressed Data Format Specification version 1.3, as described in RFC 1951.

Constructor Detail

CompressionAlgorithm

public CompressionAlgorithm(java.lang.String name)
Creates a new compression algorithm with the specified name.

Parameters:
name - The compression algorithm name. Must not be null.
Method Detail

getName

public java.lang.String getName()
Gets the name of this compression algorithm.

Returns:
The compression algorithm name.

hashCode

public int hashCode()
Overrides Object.hashCode().

Overrides:
hashCode in class java.lang.Object
Returns:
The object hash code.

equals

public boolean equals(java.lang.Object object)
Overrides Object.equals().

Overrides:
equals in class java.lang.Object
Parameters:
object - The object to compare to.
Returns:
true if the objects have the same value, otherwise false.

toString

public java.lang.String toString()
Returns the string representation of this compression algorithm.

Overrides:
toString in class java.lang.Object
Returns:
The string representation.
See Also:
getName()

toJSONString

public java.lang.String toJSONString()
Returns the JSON string representation of this compression algorithm.

Specified by:
toJSONString in interface net.minidev.json.JSONAware
Returns:
The JSON string representation.


Copyright © 2013 NimbusDS. All Rights Reserved.