Interface Compressor
-
- All Known Implementing Classes:
GzipCompressor
@ThreadSafe public interface Compressor
An abstraction for compressing messages. Implementation MUST be thread safe as the same instance is expected to be used many times and concurrently. Instances are usually singletons.This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.OutputStream
compress(java.io.OutputStream outputStream)
Wrap theoutputStream
with a compressing output stream.java.lang.String
getEncoding()
The name of the compressor encoding.
-
-
-
Method Detail
-
getEncoding
java.lang.String getEncoding()
The name of the compressor encoding.Used to identify the compressor during configuration and to populate the
Content-Encoding
header.
-
compress
java.io.OutputStream compress(java.io.OutputStream outputStream) throws java.io.IOException
Wrap theoutputStream
with a compressing output stream.- Throws:
java.io.IOException
-
-