Loop to write entire buffer
Loop to write entire buffer

Change-Id: Icfb69a3e10d6e9d96043b1e5938b2c85fda505ce

cloudfoundry-incubator/garden,cloudfoundry-incubator/garden-linux,cloudfoundry-incubator/garden-linux,tsaleh/garden,savaki/garden,cloudfoundry-incubator/garden,tangfeixiong/garden,savaki/garden,shashidharatd/garden-linux,tsaleh/garden,shashidharatd/garden-linux,cloudfoundry-incubator/garden-linux,shashidharatd/garden-linux,tangfeixiong/garden,shashidharatd/garden-linux