this.header = header;
header.readHeader(file);
// reading empty nodes in Stack
if(header instanceof TreeIndexHeader) {
TreeIndexHeader tiHeader = (TreeIndexHeader) header;
nextPageID = tiHeader.getLargestPageID();
try {
emptyPages = tiHeader.readEmptyPages(file);
}
catch(ClassNotFoundException e) {
throw new RuntimeException("ClassNotFoundException occurred when reading empty pages.", e);
}
}