Simple buffer class.