rewind buffer in getForRead
getForWrite uses the same buffer if size is suffiicient, extend and copy otherwise