LeafNode(long address, short nrecords) throws IOException { raf.seek(h5.getFileOffset(address)); if (debugPos) debugOut.println("--Btree2 InternalNode position=" + raf.getFilePointer()); // header byte[] sig = new byte[4]; raf.readFully(sig); String magic = new String(sig, CDM.utf8Charset); if (!magic.equals("BTLF")) throw new IllegalStateException(magic + " should equal BTLF"); byte version = raf.readByte(); byte nodeType = raf.readByte(); if (nodeType != btreeType) throw new IllegalStateException(); if (debugBtree2) debugOut.println(" BTree2 LeafNode version=" + version + " type=" + nodeType + " nrecords=" + nrecords); entries = new Entry2[nrecords]; for (int i = 0; i < nrecords; i++) { entries[i] = new Entry2(); entries[i].record = readRecord(btreeType); } // skip raf.readInt(); }
LeafNode(long address, short nrecords) throws IOException { raf.seek(h5.getFileOffset(address)); if (debugPos) debugOut.println("--Btree2 InternalNode position=" + raf.getFilePointer()); // header byte[] sig = new byte[4]; raf.read(sig); String magic = new String(sig); if (!magic.equals("BTLF")) throw new IllegalStateException(magic + " should equal BTLF"); byte version = raf.readByte(); byte nodeType = raf.readByte(); if (nodeType != btreeType) throw new IllegalStateException(); if (debugBtree2) debugOut.println(" BTree2 LeafNode version=" + version + " type=" + nodeType + " nrecords=" + nrecords); entries = new Entry2[nrecords]; for (int i = 0; i < nrecords; i++) { entries[i] = new Entry2(); entries[i].record = readRecord(btreeType); } int checksum = raf.readInt(); }
LeafNode(long address, short nrecords) throws IOException { raf.seek(h5.getFileOffset(address)); if (debugPos) debugOut.println("--Btree2 InternalNode position=" + raf.getFilePointer()); // header byte[] sig = new byte[4]; raf.readFully(sig); String magic = new String(sig, CDM.utf8Charset); if (!magic.equals("BTLF")) throw new IllegalStateException(magic + " should equal BTLF"); byte version = raf.readByte(); byte nodeType = raf.readByte(); if (nodeType != btreeType) throw new IllegalStateException(); if (debugBtree2) debugOut.println(" BTree2 LeafNode version=" + version + " type=" + nodeType + " nrecords=" + nrecords); entries = new Entry2[nrecords]; for (int i = 0; i < nrecords; i++) { entries[i] = new Entry2(); entries[i].record = readRecord(btreeType); } // skip raf.readInt(); }