getCurrentBufferLength

Get the valid length of the current buffer.