@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, setValueIsNotChangedpublic static final int HEAD_SIZE
public static final int HEAD_TAIL_SIZE
public static byte bitsForLength(int length)
throws HeapException
HeapExceptionpublic EnumRecordType getRecordType()
public int getNumberOfPage()
IPageRecordablepublic 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
HeapExceptionpublic void setParentPage(IPageRecordable parentPage, int inParentIndex) throws HeapException
HeapExceptionpublic IPageRecordable getParentPage() throws HeapException
HeapExceptionpublic int getInParentIndex()
throws HeapException
HeapExceptionpublic void setData(int indexInDataBlockPage,
byte[] data)
throws HeapException
HeapExceptionpublic byte[] getData(int indexInDataBlockPage)
throws HeapException
HeapExceptionpublic void setNextFreeDataBlockPositionOfFree(int indexInDataBlockPage,
long nextFreeDataBlockPosition)
throws HeapException
HeapExceptionpublic long getNextFreeDataBlockPositionOfFree(int indexInDataBlockPage)
throws HeapException
HeapExceptionprotected int readInteger()
throws HeapException
HeapExceptionprotected byte readByte()
throws HeapException
HeapExceptionprotected void readBytes(byte[] destination)
throws HeapException
HeapExceptionprotected long readLong()
throws HeapException
HeapExceptionprotected void writeBytes(byte[] dataByteArray)
throws HeapException
HeapExceptionprotected void writeLong(long value)
throws HeapException
HeapExceptionprotected void writeInteger(int value)
throws HeapException
HeapExceptionCopyright © 2007-2012 Luc Peuvrier. All Rights Reserved.