|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.util.compression.CompressionHelper
CompressionHelper
a static class that provides facilities for compressing and uncompressing
byte arrays
Constructor Summary | |
CompressionHelper()
|
Method Summary | |
static byte[] |
compressByteArray(byte[] bytes)
Used for compressing a byte array into a new byte array using the CompressionStategy found using discovery |
static CompressionStrategy |
getCompressionStrategy()
|
static boolean |
isCompressed(byte[] bytes)
Determines if a byte array is compressed. |
static byte[] |
uncompressByteArray(byte[] bytes)
Used for uncompressing a byte array into a uncompressed byte array using the CompressionStategy found using discovery |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CompressionHelper()
Method Detail |
public static final CompressionStrategy getCompressionStrategy()
public static byte[] compressByteArray(byte[] bytes) throws java.io.IOException
bytes
- An array of bytes to compress
java.io.IOException
- if it fails to write to a GZIPOutputStreamGZIPOutputStream
public static byte[] uncompressByteArray(byte[] bytes) throws java.io.IOException
bytes
- An array of bytes to uncompress
java.io.IOException
- if it fails to read from a InputStreampublic static boolean isCompressed(byte[] bytes) throws java.io.IOException
bytes
- an array of bytes
java.io.IOException
- if the byte array couldn't be read
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |