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,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
- Author:
- Gary Russell
-
-
Field Summary
-
Fields inherited from class org.springframework.amqp.support.postprocessor.AbstractCompressingPostProcessor
logger
-
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
-
Constructor Summary
Constructors Constructor Description ZipPostProcessor()ZipPostProcessor(boolean autoDecompress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OutputStreamgetCompressorStream(OutputStream zipped)Get the stream.protected 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 OutputStream getCompressorStream(OutputStream zipped) throws IOException
Description 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:
IOException- IOException
-
getEncoding
protected String getEncoding()
Description copied from class:AbstractCompressingPostProcessorGet the encoding.- Specified by:
getEncodingin classAbstractCompressingPostProcessor- Returns:
- the content-encoding header.
-
-