@Override
    public void append(byte[] bytes) {
        int requiredBytes = bytesInBuffer + bytes.length;
        if (requiredBytes > buffer.length) {
            byte [] oldbuffer = buffer;
            buffer = new byte[requiredBytes];
            System.arraycopy(oldbuffer, 0, buffer, 0, bytesInBuffer);
        }
        System.arraycopy(bytes, 0, buffer, bytesInBuffer, bytes.length);
        bytesInBuffer = requiredBytes;
    }
@see io.apiman.gateway.engine.io.IApimanBuffer#append(byte[])
gateway/engine/core/src/main/java/io/apiman/gateway/engine/io/ByteBuffer.java