BTreeV1 { public static BTreeV1Group createGroupBTree(HdfFileChannel hdfFc, long address) { ByteBuffer header = readHeaderAndValidateSignature(hdfFc, address); final byte nodeType = header.get(); if (nodeType != 0) { throw new HdfException("B tree type is not group. Type is: " + nodeType); } final byte nodeLevel = header.get(); if (nodeLevel > 0) { return new BTreeV1Group.BTreeV1GroupNonLeafNode(hdfFc, address); } else { return new BTreeV1Group.BTreeV1GroupLeafNode(hdfFc, address); } } BTreeV1(HdfFileChannel hdfFc, long address); static BTreeV1Group createGroupBTree(HdfFileChannel hdfFc, long address); static BTreeV1Data createDataBTree(HdfFileChannel hdfFc, long address, int dataDimensions); static ByteBuffer readHeaderAndValidateSignature(HdfFileChannel fc, long address); int getEntriesUsed(); long getLeftSiblingAddress(); long getRightSiblingAddress(); long getAddress(); abstract List<Long> getChildAddresses();  }
@Test void testCreatingBTreeOfGroupTypeWithDataThrows() { assertThrows(HdfException.class, () -> BTreeV1.createGroupBTree(hdfFc, 2104)); }