|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectglobal.Page
public class Page
Lowest-level view of a disk page.
Field Summary | |
---|---|
protected byte[] |
data
The actual byte array for the page. |
Fields inherited from interface global.GlobalConst |
---|
EMPTY_SLOT, FIRST_PAGEID, INVALID_PAGEID, MAX_COLSIZE, MAX_TUPSIZE, NAME_MAXLEN, PAGE_SIZE, PIN_DISKIO, PIN_MEMCPY, UNPIN_CLEAN, UNPIN_DIRTY |
Constructor Summary | |
---|---|
Page()
Default constructor; creates a blank page. |
|
Page(byte[] data)
Constructor that wraps the given byte array. |
Method Summary | |
---|---|
void |
copyPage(Page page)
Copies the contents of the given page's buffer into this page's buffer. |
char |
getCharValue(int offset)
Gets a char at the given page offset. |
byte[] |
getData()
Get accessor for the data byte array. |
float |
getFloatValue(int offset)
Gets a float at the given page offset. |
int |
getIntValue(int offset)
Gets an int at the given page offset. |
short |
getShortValue(int offset)
Gets a short at the given page offset. |
java.lang.String |
getStringValue(int offset,
int length)
Gets a string at the given page offset, given the maximum length. |
void |
setCharValue(char value,
int offset)
Sets a char at the given page offset. |
void |
setData(byte[] data)
Set accessor for the data byte array. |
void |
setFloatValue(float value,
int offset)
Sets a float at the given page offset. |
void |
setIntValue(int value,
int offset)
Sets an int at the given page offset. |
void |
setPage(Page page)
Sets this page's data array to share the given page's data array. |
void |
setShortValue(short value,
int offset)
Sets a short at the given page offset. |
void |
setStringValue(java.lang.String value,
int offset)
Sets a string at the given page offset. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected byte[] data
Constructor Detail |
---|
public Page()
public Page(byte[] data)
Method Detail |
---|
public byte[] getData()
public void setData(byte[] data)
java.lang.IllegalArgumentException
- if the data array size is invalidpublic void setPage(Page page)
public void copyPage(Page page)
public char getCharValue(int offset)
public void setCharValue(char value, int offset)
public short getShortValue(int offset)
public void setShortValue(short value, int offset)
public int getIntValue(int offset)
public void setIntValue(int value, int offset)
public float getFloatValue(int offset)
public void setFloatValue(float value, int offset)
public java.lang.String getStringValue(int offset, int length)
public void setStringValue(java.lang.String value, int offset)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |