@NotStorableClass public class DataBlockPage extends AbstractElement
Modifier and Type | Field and Description |
---|---|
static int |
HEAD_SIZE |
static int |
HEAD_TAIL_SIZE |
Constructor and Description |
---|
DataBlockPage(byte bits) |
Modifier and Type | Method and Description |
---|---|
static byte |
bitsForLength(int length) |
byte[] |
getAllData() |
byte |
getBits() |
int |
getByteSize() |
byte[] |
getData(int indexInDataBlockPage) |
IDataBlock |
getDataBlock(int index) |
IDataBlock |
getDataBlock(long dataBlockPosition) |
int |
getInParentIndex() |
long |
getNextFreeDataBlockPositionOfFree(int indexInDataBlockPage) |
int |
getNumberOfBlock() |
int |
getNumberOfPage()
the number of pages take is fix
|
IPageRecordable |
getParentPage() |
long |
getPositionInFile(int index) |
EnumRecordType |
getRecordType() |
protected byte |
readByte() |
protected void |
readBytes(byte[] destination) |
protected int |
readInteger() |
protected long |
readLong() |
void |
setAllFree() |
void |
setData(int indexInDataBlockPage,
byte[] data) |
void |
setNextFreeDataBlockPositionOfFree(int indexInDataBlockPage,
long nextFreeDataBlockPosition) |
void |
setParentPage(IPageRecordable parentPage,
int inParentIndex) |
void |
updateByteSize() |
protected void |
writeBytes(byte[] dataByteArray) |
protected void |
writeInteger(int value) |
protected void |
writeLong(long value) |
getPageRecord, getPositionInFile, getPreviousRecordPositionInFile, setPageRecord, setValueIsChangedValueToSave, setValueIsNotChanged
public static final int HEAD_SIZE
public static final int HEAD_TAIL_SIZE
public static byte bitsForLength(int length) throws HeapException
HeapException
public EnumRecordType getRecordType()
public int getNumberOfPage()
IPageRecordable
public byte getBits()
public void updateByteSize()
public int getByteSize()
public int getNumberOfBlock()
public byte[] getAllData()
public IDataBlock getDataBlock(int index)
public IDataBlock getDataBlock(long dataBlockPosition)
public long getPositionInFile(int index)
public void setAllFree() throws HeapException
HeapException
public void setParentPage(IPageRecordable parentPage, int inParentIndex) throws HeapException
HeapException
public IPageRecordable getParentPage() throws HeapException
HeapException
public int getInParentIndex() throws HeapException
HeapException
public void setData(int indexInDataBlockPage, byte[] data) throws HeapException
HeapException
public byte[] getData(int indexInDataBlockPage) throws HeapException
HeapException
public void setNextFreeDataBlockPositionOfFree(int indexInDataBlockPage, long nextFreeDataBlockPosition) throws HeapException
HeapException
public long getNextFreeDataBlockPositionOfFree(int indexInDataBlockPage) throws HeapException
HeapException
protected int readInteger() throws HeapException
HeapException
protected byte readByte() throws HeapException
HeapException
protected void readBytes(byte[] destination) throws HeapException
HeapException
protected long readLong() throws HeapException
HeapException
protected void writeBytes(byte[] dataByteArray) throws HeapException
HeapException
protected void writeLong(long value) throws HeapException
HeapException
protected void writeInteger(int value) throws HeapException
HeapException
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.