-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from jamesmudd/b-tree-cleanup
B tree cleanup
- Loading branch information
Showing
9 changed files
with
47 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ributeNameForIndexedAttributesRecord.java → ...ributeNameForIndexedAttributesRecord.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package io.jhdf.btree; | ||
package io.jhdf.btree.record; | ||
|
||
import java.nio.ByteBuffer; | ||
import java.util.BitSet; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.jhdf.btree.record; | ||
|
||
import java.nio.ByteBuffer; | ||
|
||
import io.jhdf.exceptions.HdfException; | ||
|
||
public abstract class BTreeRecord { | ||
|
||
@SuppressWarnings("unchecked") // Requires that the b-tree is of the correct type for the record | ||
public static <T extends BTreeRecord> T readRecord(byte type, ByteBuffer buffer) { | ||
switch (type) { | ||
case 5: | ||
return (T) new LinkNameForIndexedGroupRecord(buffer); | ||
case 8: | ||
return (T) new AttributeNameForIndexedAttributesRecord(buffer); | ||
default: | ||
throw new HdfException("Unknown b-tree record type. Type = " + type); | ||
} | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
.../btree/LinkNameForIndexedGroupRecord.java → ...record/LinkNameForIndexedGroupRecord.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package io.jhdf.btree; | ||
package io.jhdf.btree.record; | ||
|
||
import java.nio.ByteBuffer; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* B-Tree record classes | ||
* | ||
* @author James Mudd | ||
*/ | ||
package io.jhdf.btree.record; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters