public ISRandomAccessIO(System.IO.Stream is_Renamed, int size, int inc, int maxsize)
{
if (size < 0 || inc <= 0 || maxsize <= 0 || is_Renamed == null)
{
throw new System.ArgumentException();
}
this.is_Renamed = is_Renamed;
// Increase size by one to count in EOF
if (size < System.Int32.MaxValue)
size++;
buf = new byte[size];
this.inc = inc;
// The maximum size is one byte more, to allow reading the EOF.
if (maxsize < System.Int32.MaxValue)
maxsize++;
this.maxsize = maxsize;
pos = 0;
len = 0;
complete = false;
}