Add buffer interfaces and default implementations
Replace data array with buffer
Merge pull request #48 from gssiyankai/buffer_interface

Work over a buffer class instead of an array