private void writeModified() throws FileIOException {
final Iterator<PageNode> iterator = cacheMap.toWriteIterator();
long previousPagePositionInfile = Long.MIN_VALUE;
while (iterator.hasNext()) {
final PageNode pageNode = iterator.next();
final long pagePositionInfile = pageNode.positionInFile;
if (previousPagePositionInfile + pageSize != pagePositionInfile) {
randomAccessFileDelegate.seek(pagePositionInfile);
}
randomAccessFileDelegate.write(pageNode.data);