Merge "Provide APIs to allow reusing the passed buffer." am: 41e6a9ae91
am: 2f8f97f030

Change-Id: Ib1052808f24337f1cb2b6b6683d4622795ce29ce