Merge "Revert "Provide APIs to allow reusing the passed buffer."" am: 79c7736557
am: bb9383774e

Change-Id: Ia187c875de7fbdc7bcab73a1e0b84ce9565a998f