You mean, if you write to the buffer, how do you know how many bytes you wrote