Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
CompressionStrategy |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com | |
3 | * The software in this package is published under the terms of the CPAL v1.0 | |
4 | * license, a copy of which has been included with this distribution in the | |
5 | * LICENSE.txt file. | |
6 | */ | |
7 | package org.mule.util.compression; | |
8 | ||
9 | import java.io.IOException; | |
10 | ||
11 | /** | |
12 | * <code>CompressionStrategy</code> is a base interface for Different compression | |
13 | * strategies | |
14 | */ | |
15 | public interface CompressionStrategy | |
16 | { | |
17 | /** | |
18 | * The fully qualified class name of the fallback | |
19 | * <code>CompressionStrategy</code> implementation class to use, if no other | |
20 | * can be found. the default is | |
21 | * <code>org.mule.util.compression.GZipCompression</code> | |
22 | */ | |
23 | String COMPRESSION_DEFAULT = "org.mule.util.compression.GZipCompression"; | |
24 | ||
25 | /** | |
26 | * JDK1.3+ 'Service Provider' specification ( | |
27 | * http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html ) | |
28 | */ | |
29 | String SERVICE_ID = "META-INF/services/org.mule.util.compression.CompressionStrategy"; | |
30 | ||
31 | byte[] compressByteArray(byte[] bytes) throws IOException; | |
32 | ||
33 | byte[] uncompressByteArray(byte[] bytes) throws IOException; | |
34 | ||
35 | boolean isCompressed(byte[] bytes) throws IOException; | |
36 | } |