public interface CompressionStrategy
CompressionStrategy is a base interface for Different compression
strategies| Modifier and Type | Field and Description |
|---|---|
static String |
COMPRESSION_DEFAULT
The fully qualified class name of the fallback
CompressionStrategy implementation class to use, if no other
can be found. |
static String |
SERVICE_ID
JDK1.3+ 'Service Provider' specification (
http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html )
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
compressByteArray(byte[] bytes)
Compresses a byte array.
|
InputStream |
compressInputStream(InputStream is)
Compresses an
InputStream. |
boolean |
isCompressed(byte[] bytes)
Checks whether a byte array has been compressed or not.
|
byte[] |
uncompressByteArray(byte[] bytes)
Uncompresses a compressed byte array.
|
InputStream |
uncompressInputStream(InputStream is)
Uncompresses a compressed
InputStream. |
static final String COMPRESSION_DEFAULT
CompressionStrategy implementation class to use, if no other
can be found. the default is
org.mule.util.compression.GZipCompressionstatic final String SERVICE_ID
byte[] compressByteArray(byte[] bytes)
throws IOException
bytes - The byte array to compress.IOException - If an I/O error has occurred.InputStream compressInputStream(InputStream is) throws IOException
InputStream.is - The InputStream to compress.InputStream.IOException - If an I/O error has occurred.byte[] uncompressByteArray(byte[] bytes)
throws IOException
bytes - The byte array to uncompress.IOException - If an I/O error has occurred.InputStream uncompressInputStream(InputStream is) throws IOException
InputStream.is - The compressed InputStream.InputStream.IOException - If an I/O error has occurred.boolean isCompressed(byte[] bytes)
throws IOException
bytes - The byte array.IOException - If an I/O error has occurred.Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.