Exemple #1
0
 public static BplusTreeLong SetupFromExistingStream(System.IO.Stream fromfile, long StartSeek)
 {
     int dummyId = System.Globalization.CultureInfo.InvariantCulture.LCID;
     BplusTreeLong result = new BplusTreeLong(fromfile, 7, 100, StartSeek, dummyId); // dummy values for nodesize, keysize
     result.readHeader();
     result.buffers = BufferFile.SetupFromExistingStream(fromfile, StartSeek+result.headersize);
     if (result.buffers.buffersize != result.buffersize)
     {
         throw new BplusTreeException("inner and outer buffer sizes should match");
     }
     if (result.rootSeek!=NULLBUFFERNUMBER)
     {
         result.root = new BplusNode(result, null, -1, true);
         result.root.LoadFromBuffer(result.rootSeek);
     }
     return result;
 }