if (headers != null)
buffer.getHeader().append(headers);
CachedOutputStream cos = (CachedOutputStream)message.getContent(OutputStream.class);
OutputStream originalOs = (OutputStream)message.get(OUTPUT_STREAM_HOLDER);
cos.writeCacheTo(buffer.getPayload(),limit);
cos.writeCacheTo(originalOs);
message.setContent(OutputStream.class,originalOs);
if (logger.isInfoEnabled())
logger.info(buffer.toString());