## org.h2.index
Class BtreeLeaf

    java.lang.Object
      org.h2.util.CacheObject
          org.h2.store.Record
              org.h2.index.BtreePage
                  org.h2.index.BtreeLeaf

    public class BtreeLeaf

extends BtreePage

An outer page of a b-tree index. Page format:

     L { P(pointers) | D(data) } data.len { data[0].pos [data[0]], ...  }

Field Summary

Fields inherited from class org.h2.index.BtreePage
`BLOCKS_PER_PAGE, index, pageData, root`

Fields inherited from class org.h2.util.CacheObject
`blockCount, cacheQueue, chained, next, previous`

Method Summary
`void` `prepareWrite()` This method is called just before the page is written.
`void` `write(DataPage buff)` Write the record to the data page.

Methods inherited from class org.h2.index.BtreePage
`getByteCount, isEmpty, isPinned`

Methods inherited from class org.h2.store.Record
`canRemove, commit, getSessionId, getStorageId, isDeleted, isLogWritten, setDeleted, setLastLog, setLogWritten, setSessionId, setStorageId`

Methods inherited from class org.h2.util.CacheObject
`getBlockCount, getMemorySize, getPos, isChanged, setBlockCount, setChanged, setPos, sort`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### prepareWrite

    public void prepareWrite()
                      throws java.sql.SQLException

  Description copied from class: `Record`
  This method is called just before the page is written. If a read operation is required before writing, this needs to be done here. Because the data page buffer is shared for read and write operations. The method may read data and change the file pointer.

  Overrides:
    `prepareWrite` in class `Record`
  Throws:
    `java.sql.SQLException`

### write

    public void write(DataPage buff)
               throws java.sql.SQLException

  Description copied from class: `Record`
  Write the record to the data page.

  Specified by:
    `write` in class `Record`
  Parameters:
    `buff` - the data page
  Throws:
    `java.sql.SQLException`