org.apache.camel.component.http.helper
Class GZIPHelper

java.lang.Object
  extended by org.apache.camel.component.http.helper.GZIPHelper

public final class GZIPHelper
extends Object

Helper class to help wrapping content into GZIP input and output streams.


Field Summary
static String CONTENT_ENCODING
           
static String GZIP
           
 
Method Summary
static byte[] compressGZIP(byte[] data)
           
static InputStream compressGzip(String contentEncoding, byte[] data)
           
static InputStream compressGzip(String contentEncoding, InputStream in)
           
static boolean containsGzip(String str)
          Deprecated. use isGzip
static boolean isGzip(Message message)
           
static boolean isGzip(String header)
           
static void setGZIPContentEncoding(HttpServletResponse response)
          Deprecated. set the header using HttpServletResponse.setHeader(String, String)
static void setGZIPMessageHeader(Message message)
          Deprecated. set the header using Message.setHeader(String, Object)
static InputStream uncompressGzip(String contentEncoding, InputStream in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_ENCODING

public static final String CONTENT_ENCODING
See Also:
Constant Field Values

GZIP

public static final String GZIP
See Also:
Constant Field Values
Method Detail

setGZIPMessageHeader

public static void setGZIPMessageHeader(Message message)
Deprecated. set the header using Message.setHeader(String, Object)


setGZIPContentEncoding

public static void setGZIPContentEncoding(HttpServletResponse response)
Deprecated. set the header using HttpServletResponse.setHeader(String, String)


uncompressGzip

public static InputStream uncompressGzip(String contentEncoding,
                                         InputStream in)
                                  throws IOException
Throws:
IOException

compressGzip

public static InputStream compressGzip(String contentEncoding,
                                       InputStream in)
                                throws IOException
Throws:
IOException

compressGzip

public static InputStream compressGzip(String contentEncoding,
                                       byte[] data)
                                throws IOException
Throws:
IOException

compressGZIP

public static byte[] compressGZIP(byte[] data)
                           throws IOException
Throws:
IOException

isGzip

public static boolean isGzip(Message message)

isGzip

public static boolean isGzip(String header)

containsGzip

public static boolean containsGzip(String str)
Deprecated. use isGzip



Apache CAMEL