class FileHeader extends java.lang.Object implements BlockView
| Modifier and Type | Field and Description |
|---|---|
private BlockIo |
block
The BlockIo used to store the FileHeader
|
(package private) static int |
NROOTS
The number of "root" rowids available in the file.
|
private static short |
O_LISTS
Position of the Lists in the blockIo
|
private static short |
O_MAGIC
Position of the Magic number for FileHeader
|
private static int |
O_ROOTS
Position of the ROOTs in the blockIo
|
| Constructor and Description |
|---|
FileHeader(BlockIo block,
boolean isNew)
Constructs a FileHeader object from a block.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) long |
getFirstOf(int list)
Returns the first block of the indicated list
|
(package private) long |
getLastOf(int list)
Returns the last block of the indicated list
|
(package private) long |
getRoot(int root)
Returns the indicated root rowid.
|
private short |
offsetOfFirst(int list)
Returns the offset of the "first" block of the indicated list
|
private short |
offsetOfLast(int list)
Returns the offset of the "last" block of the indicated list
|
private short |
offsetOfRoot(int root)
Returns the offset of the indicated root
|
(package private) void |
setFirstOf(int list,
long value)
Sets the first block of the indicated list
|
(package private) void |
setLastOf(int list,
long value)
Sets the last block of the indicated list
|
(package private) void |
setRoot(int root,
long rowid)
Sets the indicated root rowid.
|
java.lang.String |
toString() |
private static final short O_MAGIC
private static final short O_LISTS
private static final int O_ROOTS
private BlockIo block
static final int NROOTS
FileHeader(BlockIo block, boolean isNew)
block - The block that contains the file headerisNew - If true, the file header is for a new file.java.io.IOException - if the block is too short to keep the file
header.private short offsetOfFirst(int list)
private short offsetOfLast(int list)
private short offsetOfRoot(int root)
long getFirstOf(int list)
void setFirstOf(int list,
long value)
long getLastOf(int list)
void setLastOf(int list,
long value)
long getRoot(int root)
NROOTSvoid setRoot(int root,
long rowid)
getRoot(int),
NROOTSpublic java.lang.String toString()
toString in class java.lang.Object