public static ByteBuffer upsize(ByteBuffer buf) {
		return resize(buf, buf.capacity() * 2);
	}
Resize a write-mode buffer to twice its current capacity

<p>
This preserves the buffer contents

@param buf the buffer
@return the new buffer
Ghidra/Debug/ProposedUtils/src/main/java/ghidra/util/ByteBufferUtils.java