Class CompressionStrategy
- java.lang.Object
-
- org.forgerock.openam.cts.utils.blob.strategies.CompressionStrategy
-
- All Implemented Interfaces:
BlobStrategy
public class CompressionStrategy extends Object implements BlobStrategy
Responsible for compressing the binary object of Tokens using a GZip compression.
-
-
Constructor Summary
Constructors Constructor Description CompressionStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]perform(byte[] blob)Compress the Tokens binary object.byte[]reverse(byte[] blob)Decompress the Tokens binary object.
-
-
-
Method Detail
-
perform
public byte[] perform(byte[] blob) throws TokenStrategyFailedExceptionCompress the Tokens binary object.- Specified by:
performin interfaceBlobStrategy- Parameters:
blob- Non null Token to modify.- Throws:
TokenStrategyFailedException- If an error occurred whilst processing the Token.
-
reverse
public byte[] reverse(byte[] blob) throws TokenStrategyFailedExceptionDecompress the Tokens binary object.- Specified by:
reversein interfaceBlobStrategy- Parameters:
blob- Non null Token to modify.- Throws:
TokenStrategyFailedException- If an error occurred whilst processing the Token.
-
-