public override System.Object Clone()
{
MultiMMapIndexInput clone = (MultiMMapIndexInput) base.Clone();
clone.isClone = true;
clone.buffers = new System.IO.MemoryStream[buffers.Length];
// No need to clone bufSizes.
// Since most clones will use only one buffer, duplicate() could also be
// done lazy in clones, e.g. when adapting curBuf.
for (int bufNr = 0; bufNr < buffers.Length; bufNr++)
{
clone.buffers[bufNr] = buffers[bufNr]; // clone.buffers[bufNr] = buffers[bufNr].duplicate(); // {{Aroush-1.9}} how do we clone?!
}
try
{
clone.Seek(FilePointer);
}
catch (System.IO.IOException ioe)
{
System.SystemException newException = new System.SystemException(ioe.Message, ioe);
throw newException;
}
return clone;
}