private void SetInternalPosition(long lPos, string argumentName)
{
long pos = lPos;
if (pos < 0)
{
throw new ArgumentOutOfRangeException(argumentName);
}
for (int ii = 0; ii < _cachedBytes.Count; ii++)
{
if (pos > _cachedBytes[ii].Length)
{
pos -= _cachedBytes[ii].Length;
}
else
{
_currentArrayIndex = ii;
_currentPosition = (int)pos;
return;
}
}
if (pos > 0)
throw new ArgumentOutOfRangeException(argumentName);
}