Пример #1
0
        public static BplusTreeBytes ReOpen(System.IO.Stream treefile, System.IO.Stream blockfile)
        {
            BplusTreeLong tree    = BplusTreeLong.SetupFromExistingStream(treefile);
            LinkedFile    archive = LinkedFile.SetupFromExistingStream(blockfile);

            return(new BplusTreeBytes(tree, archive));
        }
Пример #2
0
        public static BplusTreeBytes Initialize(System.IO.Stream treefile, System.IO.Stream blockfile, int keyLength, int cultureId,
                                                int nodesize, int buffersize)
        {
            BplusTreeLong tree    = BplusTreeLong.InitializeInStream(treefile, keyLength, nodesize, cultureId);
            LinkedFile    archive = LinkedFile.InitializeLinkedFileInStream(blockfile, buffersize);

            return(new BplusTreeBytes(tree, archive));
        }
Пример #3
0
        public static LinkedFile SetupFromExistingStream(System.IO.Stream fromfile, long StartSeek)
        {
            LinkedFile result = new LinkedFile(100, StartSeek); // dummy buffer size for now

            result.fromfile = fromfile;
            result.ReadHeader();
            result.buffers = BufferFile.SetupFromExistingStream(fromfile, StartSeek + result.headersize);
            return(result);
        }
Пример #4
0
        public static LinkedFile InitializeLinkedFileInStream(System.IO.Stream fromfile, int buffersize, long startSeek)
        {
            LinkedFile result = new LinkedFile(buffersize, startSeek);

            result.fromfile = fromfile;
            result.SetHeader();
            // buffersize should be increased by overhead...
            result.buffers = BufferFile.InitializeBufferFileInStream(fromfile, buffersize + BUFFEROVERHEAD, startSeek + result.headersize);
            return(result);
        }
Пример #5
0
 public BplusTreeBytes(BplusTreeLong tree, LinkedFile archive)
 {
     this.tree    = tree;
     this.archive = archive;
 }