Interface ContentDecoder
- All Known Implementing Classes:
 GZIPContentDecoder
- 
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classFactory forContentDecoders; subclasses must implementContentDecoder.Factory.newContentDecoder(). - 
Method Summary
Modifier and TypeMethodDescriptiondefault voidafterDecoding(Response response) Processes the exchange after the response content has been decoded.default voidbeforeDecoding(Response response) Processes the response just before the decoding of the response content.decode(ByteBuffer buffer) Decodes the bytes in the givenbufferand returns the decoded bytes. 
- 
Method Details
- 
beforeDecoding
Processes the response just before the decoding of the response content.
Typical processing may involve modifying the response headers, for example by temporarily removing the
Content-Lengthheader, or modifying theContent-Encodingheader. - 
decode
Decodes the bytes in the given
bufferand returns the decoded bytes.The returned
RetainableByteBufferwill eventually be released viaRetainable.release()by the code that called this method.- Parameters:
 buffer- the buffer containing encoded bytes- Returns:
 - a buffer containing decoded bytes
 
 - 
afterDecoding
Processes the exchange after the response content has been decoded.
Typical processing may involve modifying the response headers, for example updating the
Content-Lengthheader to the length of the decoded response content. 
 -