class Utils {

    public static void decodeBody(Operation op, ByteBuffer buffer, boolean isRequest)
            throws Exception {
        String contentEncodingHeader = null;
        if (!isRequest) {
            contentEncodingHeader = op.getResponseHeaderAsIs(Operation.CONTENT_ENCODING_HEADER);
        } else if (!op.isFromReplication()) {
            contentEncodingHeader = op.getRequestHeaderAsIs(Operation.CONTENT_ENCODING_HEADER);
        }

        boolean compressed = false;
        if (contentEncodingHeader != null) {
            compressed = Operation.CONTENT_ENCODING_GZIP.equals(contentEncodingHeader);
        }

        decodeBody(op, buffer, isRequest, compressed);
    }

    private  Utils();

}