private void FlushContents()
{
if (bodyBuffer.Length>0) {
ContentSink.OnContent(
new Content(streamIndex, DateTime.Now-streamOrigin, position, bodyBuffer.ToArray()));
position += bodyBuffer.Length;
bodyBuffer.SetLength(0);
}
flushTimer.Reset();
flushTimer.Start();
}