/** * Constructs a new PageHeader of the indicated type. Used for newly * created pages. */ PageHeader(BlockIo block, short type) { initialize(block); setType(type); }
/** * Constructs a PageHeader object from a block * * @param block The block that contains the file header * @throws IOException if the block is too short to keep the file * header. */ protected PageHeader(BlockIo block) { initialize(block); if (!magicOk()) throw new Error("CRITICAL: page header magic for block " + block.getBlockId() + " not OK " + getMagic()); }