public class CompressionUtil extends Object
CompressionScheme
.Modifier and Type | Method and Description |
---|---|
static String |
decode(CompressionScheme compressionScheme,
byte[] message)
Decodes a message using the associated
ICoder for the provided CompressionScheme . |
static byte[] |
encode(CompressionScheme compressionScheme,
String message)
Encodes a message using the associated
ICoder for the provided CompressionScheme . |
public static byte[] encode(CompressionScheme compressionScheme, String message) throws IOException
ICoder
for the provided CompressionScheme
.compressionScheme
- The CompressionScheme
to use to encode the messagemessage
- The message to be encodedIOException
- If there is problem encoding the messagepublic static String decode(CompressionScheme compressionScheme, byte[] message) throws IOException
ICoder
for the provided CompressionScheme
.compressionScheme
- The CompressionScheme
to use to decode the messagemessage
- The encoded messageIOException
- If there is problem decoding the messageCopyright © 2018. All rights reserved.