|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.util.compression.GZipCompression
GZipCompression
a CompressionStrategy implementation
using the GZip library included in the JDK java.util.zip.
This is the default CompressionStrategy used by the CompressionHelper
discovery when no other implementation is discovered
Field Summary |
Fields inherited from interface org.mule.util.compression.CompressionStrategy |
COMPRESSION_DEFAULT, SERVICE_ID |
Constructor Summary | |
GZipCompression()
|
Method Summary | |
byte[] |
compressByteArray(byte[] bytes)
Used for compressing a byte array into a new byte array using GZIP |
boolean |
isCompressed(byte[] bytes)
Determines if a byte array is compressed. |
byte[] |
uncompressByteArray(byte[] bytes)
Used for uncompressing a byte array into a uncompressed byte array using GZIP |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GZipCompression()
Method Detail |
public boolean isCompressed(byte[] bytes) throws java.io.IOException
isCompressed
in interface CompressionStrategy
bytes
- an array of bytes
java.io.IOException
- if the byte array couldn't be readpublic byte[] compressByteArray(byte[] bytes) throws java.io.IOException
compressByteArray
in interface CompressionStrategy
bytes
- An array of bytes to compress
java.io.IOException
- if it fails to write to a GZIPOutputStreamGZIPOutputStream
public byte[] uncompressByteArray(byte[] bytes) throws java.io.IOException
uncompressByteArray
in interface CompressionStrategy
bytes
- An array of bytes to uncompress
java.io.IOException
- if it fails to read from a GZIPInputStreamGZIPInputStream
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |