class GzipDecompressorProcessor extends ProcessorBase {

    @Override
    public void process(final WilmaHttpEntity entity) throws ApplicationException {
        if (isContentGzipEncoded(entity)) {
            ByteArrayOutputStream baos = decompressor.decompress(entity.getInputStream());
            ByteArrayInputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
            entity.setInputStream(inputStream);
            entity.setBody(baos.toString());
        }
    }

}