Class ZipPostProcessor
- java.lang.Object
-
- org.springframework.amqp.support.postprocessor.AbstractCompressingPostProcessor
-
- org.springframework.amqp.support.postprocessor.AbstractDeflaterPostProcessor
-
- org.springframework.amqp.support.postprocessor.ZipPostProcessor
-
- All Implemented Interfaces:
MessagePostProcessor,org.springframework.core.Ordered
public class ZipPostProcessor extends AbstractDeflaterPostProcessor
A post processor that uses aZipOutputStreamto compress the message body. SetsMessageProperties.SPRING_AUTO_DECOMPRESSto true by default.- Since:
- 1.4.2
-
-
Field Summary
-
Fields inherited from class org.springframework.amqp.support.postprocessor.AbstractCompressingPostProcessor
logger
-
-
Constructor Summary
Constructors Constructor Description ZipPostProcessor()ZipPostProcessor(boolean autoDecompress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.io.OutputStreamgetCompressorStream(java.io.OutputStream zipped)Get the stream.protected java.lang.StringgetEncoding()Get the encoding.-
Methods inherited from class org.springframework.amqp.support.postprocessor.AbstractDeflaterPostProcessor
getLevel, setLevel
-
Methods inherited from class org.springframework.amqp.support.postprocessor.AbstractCompressingPostProcessor
getOrder, postProcessMessage, setCopyProperties, setEncodingDelimiter, setOrder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.amqp.core.MessagePostProcessor
postProcessMessage, postProcessMessage
-
-
-
-
Method Detail
-
getCompressorStream
protected java.io.OutputStream getCompressorStream(java.io.OutputStream zipped) throws java.io.IOExceptionDescription copied from class:AbstractCompressingPostProcessorGet the stream.- Specified by:
getCompressorStreamin classAbstractCompressingPostProcessor- Parameters:
zipped- The output stream to write the compressed data to.- Returns:
- the compressor output stream.
- Throws:
java.io.IOException- IOException
-
getEncoding
protected java.lang.String getEncoding()
Description copied from class:AbstractCompressingPostProcessorGet the encoding.- Specified by:
getEncodingin classAbstractCompressingPostProcessor- Returns:
- the content-encoding header.
-
-