void SetPosition(long pos)
{
if (pos < 0)
{
throw new ArgumentOutOfRangeException("position");
}
this.position = pos;
int arrayIndex = 0;
while (arrayIndex < this.bufferList.Count && pos > 0)
{
if (pos >= this.bufferList[arrayIndex].Count)
{
pos -= this.bufferList[arrayIndex].Count;
++arrayIndex;
}
else
{
break;
}
}
this.readArray = arrayIndex;
this.readOffset = (int)pos;
}