Create a new copy of size newSize based on the content of this buffer. This method is much more efficient than creating a new instance and copying values one by one.
newSize