org.apache.camel.component.http.helper
Class GZIPHelper
java.lang.Object
org.apache.camel.component.http.helper.GZIPHelper
public final class GZIPHelper
- extends Object
Helper/Utility class to help wrapping
content into GZIP Input/Output Streams.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONTENT_ENCODING
public static final String CONTENT_ENCODING
- See Also:
- Constant Field Values
GZIP
public static final String GZIP
- See Also:
- Constant Field Values
setGZIPMessageHeader
public static void setGZIPMessageHeader(Message message)
setGZIPContentEncoding
public static void setGZIPContentEncoding(HttpServletResponse response)
getInputStream
public static InputStream getInputStream(org.apache.commons.httpclient.HttpMethod method)
throws IOException
- Throws:
IOException
getInputStream
public static InputStream getInputStream(HttpServletRequest request)
throws IOException
- Throws:
IOException
getGZIPWrappedInputStream
public static InputStream getGZIPWrappedInputStream(String gzipEncoding,
InputStream inStream)
throws IOException
- Throws:
IOException
toGZIPInputStreamIfRequested
public static InputStream toGZIPInputStreamIfRequested(String gzipEncoding,
byte[] array)
throws Exception
- Throws:
Exception
compressArrayIfGZIPRequested
public static byte[] compressArrayIfGZIPRequested(String gzipEncoding,
byte[] array)
throws IOException
- Throws:
IOException
compressArrayIfGZIPRequested
public static byte[] compressArrayIfGZIPRequested(String gzipEncoding,
byte[] array,
HttpServletResponse response)
throws IOException
- Throws:
IOException
getGZIPWrappedOutputStream
public static ByteArrayOutputStream getGZIPWrappedOutputStream(byte[] array)
throws IOException
- Throws:
IOException
Copyright © 2009 Apache Software Foundation. All Rights Reserved.