a buffer class