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
A post processor that uses a
ZipOutputStream
to compress the message body. Sets
MessageProperties.SPRING_AUTO_DECOMPRESS
to 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected OutputStream
getCompressorStream
(OutputStream zipped) Get the stream.protected String
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
-
Constructor Details
-
ZipPostProcessor
public ZipPostProcessor() -
ZipPostProcessor
public ZipPostProcessor(boolean autoDecompress)
-
-
Method Details
-
getCompressorStream
Description copied from class:AbstractCompressingPostProcessor
Get the stream.- Specified by:
getCompressorStream
in classAbstractCompressingPostProcessor
- Parameters:
zipped
- The output stream to write the compressed data to.- Returns:
- the compressor output stream.
- Throws:
IOException
- IOException
-
getEncoding
Description copied from class:AbstractCompressingPostProcessor
Get the encoding.- Specified by:
getEncoding
in classAbstractCompressingPostProcessor
- Returns:
- the content-encoding header.
-