@Override
    public void flush() throws IOException {
      getHeaders().setContentLength(getContentLength());
      outputStream.writeTo(httpOutputMessage.getBody());
      outputStream.reset();
    }
The CustomMappingJackson2HttpMessageConverter class...

@see org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
@since GemFire 0.0.1
geode-web-api/src/main/java/org/apache/geode/rest/internal/web/http/converter/CustomMappingJackson2HttpMessageConverter.java