| java.lang.Object com.healthmarketscience.jackcess.PageChannel
PageChannel | public class PageChannel implements Channel,Flushable(Code) | | Reads and writes individual pages in a database file
author: Tim McCune |
INVALID_PAGE_NUMBER | final static int INVALID_PAGE_NUMBER(Code) | | |
PageChannel | public PageChannel(FileChannel channel, JetFormat format, boolean autoSync) throws IOException(Code) | | Parameters: channel - Channel containing the database Parameters: format - Format of the database in the channel |
PageChannel | PageChannel(boolean testing)(Code) | | Only used by unit tests
|
createBuffer | public ByteBuffer createBuffer(int size)(Code) | | A newly-allocated buffer of the given size and LITTLE_ENDIAN byteorder |
createBuffer | public ByteBuffer createBuffer(int size, ByteOrder order)(Code) | | A newly-allocated buffer of the given size and byte order |
createPageBuffer | public ByteBuffer createPageBuffer()(Code) | | A newly-allocated buffer that can be passed to readPage |
initialize | public void initialize(Database database) throws IOException(Code) | | Does second-stage initialization, must be called after construction.
|
isOpen | public boolean isOpen()(Code) | | |
narrowBuffer | public static ByteBuffer narrowBuffer(ByteBuffer buffer, int position, int limit)(Code) | | a duplicate of the current buffer narrowed to the given positionand limit. mark will be set at the current position. |
readPage | public void readPage(ByteBuffer buffer, int pageNumber) throws IOException(Code) | | Parameters: buffer - Buffer to read the page into Parameters: pageNumber - Number of the page to read in (starting at 0) |
writeNewPage | public int writeNewPage(ByteBuffer page) throws IOException(Code) | | Write a page to disk as a new page, appending it to the database
Parameters: page - Page to write Page number at which the page was written |
writePage | public void writePage(ByteBuffer page, int pageNumber) throws IOException(Code) | | Write a page to disk
Parameters: page - Page to write Parameters: pageNumber - Page number to write the page to |
writePage | public void writePage(ByteBuffer page, int pageNumber, int pageOffset) throws IOException(Code) | | Write a page (or part of a page) to disk
Parameters: page - Page to write Parameters: pageNumber - Page number to write the page to Parameters: pageOffset - offset within the page at which to start writing thepage data |
|
|