Moving buffer generation into DataBuffer.