public ByteBuffer encodePage(ByteBuffer page, int pageNumber, int pageOffset) throws IOException { ByteBuffer bb = _bufH.getPageBuffer(_channel); bb.clear(); simpleEncode(page.array(), bb.array(), pageNumber, pageOffset, page.limit()); return bb; }
public ByteBuffer encodePage(ByteBuffer page, int pageNumber, int pageOffset) throws IOException { assertEquals(0, pageOffset); assertEquals(_channel.getFormat().PAGE_SIZE, page.limit()); ByteBuffer bb = _bufH.getPageBuffer(_channel); bb.clear(); fullEncode(page.array(), bb.array(), pageNumber); return bb; }