//file is smaller, return empty data
return ByteBuffer.wrap(PageFile.CLEAN_DATA).asReadOnlyBuffer();
}
b.position(offsetInFile);
ByteBuffer ret = b.slice();
ret.limit(PAGE_SIZE);
if(!transactionsDisabled||readonly){
// changes written into buffer will be directly written into file
// so we need to protect buffer from modifications
ret = ret.asReadOnlyBuffer();