@Override
    public byte[] getBody() {
        if (bodyChunks.size() == 0) {
            return null;
        }

        int size = this.getBodyLength();
        byte[] body = new byte[size];
        int offset = 0;
        for (HttpContent chunk : bodyChunks) {
            ByteBuf content = chunk.content();
            int len = content.writerIndex(); // writer idx tracks the total readable bytes in the buffer
            content.getBytes(0, body, offset, len);
            offset += len;
        }
        return body;
    }
User: michaels@netflix.com
Date: 2/20/15
Time: 3:10 PM
zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessageImpl.java