Added example for buffer api.