added total length property to BufferSegmentReader