Copy the buffer data