add buffer api
Revert "add buffer api"

This reverts commit 1e14d3c92f2ec84ed99d0948045b9fa8c4f25c45.