Doubles the size of the ByteBuffer, and copies the old data towards the end of the new buffer (since we build the buffer backwards).
See Implementation
Doubles the size of the ByteBuffer, and copies the old data towards the end of the new buffer (since we build the buffer backwards).